Skip to content

Commit

Permalink
Merge pull request #30576 from nextcloud/backport/30565/stable23
Browse files Browse the repository at this point in the history
[stable23] Fix fail when keys/files folder already exists
  • Loading branch information
artonge authored Jan 11, 2022
2 parents 67fcbac + 9eeaed0 commit ad5501a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/private/Files/Storage/Wrapper/Encryption.php
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,11 @@ private function copyBetweenStorage(Storage\IStorage $sourceStorage, $sourceInte

if ($sourceStorage->is_dir($sourceInternalPath)) {
$dh = $sourceStorage->opendir($sourceInternalPath);
$result = $this->mkdir($targetInternalPath);
if (!$this->is_dir($targetInternalPath)) {
$result = $this->mkdir($targetInternalPath);
} else {
$result = true;
}
if (is_resource($dh)) {
while ($result and ($file = readdir($dh)) !== false) {
if (!Filesystem::isIgnoredDir($file)) {
Expand Down

0 comments on commit ad5501a

Please sign in to comment.