diff options
author | Vincent Petry <vincent@nextcloud.com> | 2022-01-10 16:42:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-10 16:42:02 +0100 |
commit | 5c7ab1fdb1149086625862eda9d311c7a65304fa (patch) | |
tree | a8c346c34b2345d065bd7d0aa7a1cfb7c91d306c | |
parent | 8954e512072f9c7246485994072f1361e8211fd1 (diff) | |
parent | be590df58863deb959fc54c46594086d2de3c402 (diff) | |
download | nextcloud-server-5c7ab1fdb1149086625862eda9d311c7a65304fa.tar.gz nextcloud-server-5c7ab1fdb1149086625862eda9d311c7a65304fa.zip |
Merge pull request #30565 from nextcloud/bugfix/30564/fix-mkdir-fail-when-keys-folder-exists
Fix fail when keys/files folder already exists
-rw-r--r-- | lib/private/Files/Storage/Wrapper/Encryption.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/private/Files/Storage/Wrapper/Encryption.php b/lib/private/Files/Storage/Wrapper/Encryption.php index 3ee715ae3d3..3fb21fbc01c 100644 --- a/lib/private/Files/Storage/Wrapper/Encryption.php +++ b/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)) { |