summaryrefslogtreecommitdiffstats
path: root/lib/private/Files
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2021-01-05 09:12:11 +0100
committerJulius Härtl <jus@bitgrid.net>2021-01-05 09:20:35 +0100
commit98560c80ea18df3629f374caa036221dadcb25f2 (patch)
tree700c8d31504595c28bd3eae1c7344d17d8ee6d01 /lib/private/Files
parentee842f1c43d2d004d2639382fe0a7ba08f3d06cb (diff)
downloadnextcloud-server-98560c80ea18df3629f374caa036221dadcb25f2.tar.gz
nextcloud-server-98560c80ea18df3629f374caa036221dadcb25f2.zip
Properly handle result when copying with failure and throw in tests
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib/private/Files')
-rw-r--r--lib/private/Files/Storage/Common.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/Files/Storage/Common.php b/lib/private/Files/Storage/Common.php
index bddb1f4a294..aa2aeee403b 100644
--- a/lib/private/Files/Storage/Common.php
+++ b/lib/private/Files/Storage/Common.php
@@ -689,9 +689,9 @@ abstract class Common implements Storage, ILockingStorage, IWriteStreamStorage {
$result = $this->copyFromStorage($sourceStorage, $sourceInternalPath, $targetInternalPath, true);
if ($result) {
if ($sourceStorage->is_dir($sourceInternalPath)) {
- $result &= $sourceStorage->rmdir($sourceInternalPath);
+ $result = $result && $sourceStorage->rmdir($sourceInternalPath);
} else {
- $result &= $sourceStorage->unlink($sourceInternalPath);
+ $result = $result && $sourceStorage->unlink($sourceInternalPath);
}
}
return $result;