Browse Source
Merge pull request #30565 from nextcloud/bugfix/30564/fix-mkdir-fail-when-keys-folder-exists
Fix fail when keys/files folder already exists
pull/30363/head
Vincent Petry
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
5 additions and
1 deletions
-
lib/private/Files/Storage/Wrapper/Encryption.php
|
|
@ -768,7 +768,11 @@ class Encryption extends Wrapper { |
|
|
|
|
|
|
|
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)) { |
|
|
|