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
parent
commit
5c7ab1fdb1
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      lib/private/Files/Storage/Wrapper/Encryption.php

6
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)) {

Loading…
Cancel
Save