summaryrefslogtreecommitdiffstats
path: root/lib/private/Files/Storage/Wrapper/PermissionsMask.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Files/Storage/Wrapper/PermissionsMask.php')
-rw-r--r--lib/private/Files/Storage/Wrapper/PermissionsMask.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/private/Files/Storage/Wrapper/PermissionsMask.php b/lib/private/Files/Storage/Wrapper/PermissionsMask.php
index 39375602c34..7bcb1087fef 100644
--- a/lib/private/Files/Storage/Wrapper/PermissionsMask.php
+++ b/lib/private/Files/Storage/Wrapper/PermissionsMask.php
@@ -78,6 +78,14 @@ class PermissionsMask extends Wrapper {
}
public function rename($path1, $path2) {
+ $p = strpos($path1, $path2);
+ if ($p === 0) {
+ $part = substr($path1, strlen($path2));
+ //This is a rename of the transfer file to the original file
+ if (strpos($part, '.ocTransferId') === 0) {
+ return $this->checkMask(Constants::PERMISSION_CREATE) and parent::rename($path1, $path2);
+ }
+ }
return $this->checkMask(Constants::PERMISSION_UPDATE) and parent::rename($path1, $path2);
}