summaryrefslogtreecommitdiffstats
path: root/lib
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 16:57:51 +0100
commit8d9fa73371df5f9dbcdd0b552ad6000cff1ceeb7 (patch)
treede1b487f989599ff4643098b3d4bee451ea9fd66 /lib
parent865e4ab0ec380b9cd22946233ab685220aaf991f (diff)
downloadnextcloud-server-8d9fa73371df5f9dbcdd0b552ad6000cff1ceeb7.tar.gz
nextcloud-server-8d9fa73371df5f9dbcdd0b552ad6000cff1ceeb7.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')
-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 cba8afa176e..7240a57f932 100644
--- a/lib/private/Files/Storage/Common.php
+++ b/lib/private/Files/Storage/Common.php
@@ -688,9 +688,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;