Skip to content

Commit bc3c463

Browse files
juliusknorrskjnldsv
authored andcommitted
Make sure that a empty directory can still be deleted when copied from another storage
Signed-off-by: Julius Härtl <jus@bitgrid.net>
1 parent 8a14f64 commit bc3c463

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/private/Files/Storage/Common.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -612,6 +612,7 @@ public function copyFromStorage(IStorage $sourceStorage, $sourceInternalPath, $t
612612
$dh = $sourceStorage->opendir($sourceInternalPath);
613613
$result = $this->mkdir($targetInternalPath);
614614
if (is_resource($dh)) {
615+
$result = true;
615616
while ($result and ($file = readdir($dh)) !== false) {
616617
if (!Filesystem::isIgnoredDir($file)) {
617618
$result &= $this->copyFromStorage($sourceStorage, $sourceInternalPath . '/' . $file, $targetInternalPath . '/' . $file);

0 commit comments

Comments
 (0)