diff options
author | Julius Härtl <jus@bitgrid.net> | 2020-11-17 16:29:56 +0300 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2021-10-11 11:01:08 +0300 |
commit | df3ed040e44b1e2873fb7c0455fe2671aa6c5b5d (patch) | |
tree | 8be2539b2425d5f89568a21f8c867d96d77c6f97 /lib/private | |
parent | 5d47c68e90211969cd6068040f4664ef3b1575d6 (diff) |
Make sure that a empty directory can still be deleted when copied from another storage
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/Files/Storage/Common.php | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/private/Files/Storage/Common.php b/lib/private/Files/Storage/Common.php index 21baea1b78f..40af5dfae51 100644 --- a/lib/private/Files/Storage/Common.php +++ b/lib/private/Files/Storage/Common.php @@ -612,6 +612,7 @@ abstract class Common implements Storage, ILockingStorage, IWriteStreamStorage { $dh = $sourceStorage->opendir($sourceInternalPath); $result = $this->mkdir($targetInternalPath); if (is_resource($dh)) { + $result = true; while ($result and ($file = readdir($dh)) !== false) { if (!Filesystem::isIgnoredDir($file)) { $result &= $this->copyFromStorage($sourceStorage, $sourceInternalPath . '/' . $file, $targetInternalPath . '/' . $file); |