diff options
author | Julius Härtl <jus@bitgrid.net> | 2020-11-17 14:29:56 +0100 |
---|---|---|
committer | John Molakvoæ (Rebase PR Action) <skjnldsv@users.noreply.github.com> | 2021-08-13 16:34:48 +0000 |
commit | bc3c46362abfb569a1919cdfca2762a0d15d520c (patch) | |
tree | 7fc21c3bd11653e9443f47eb700e727ab9b6577a /lib/private | |
parent | 8a14f64ac2005d972aafce7c84c65b5f964e7c84 (diff) | |
download | nextcloud-server-bc3c46362abfb569a1919cdfca2762a0d15d520c.tar.gz nextcloud-server-bc3c46362abfb569a1919cdfca2762a0d15d520c.zip |
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 0814e296492..4c07426dd70 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); |