There was an error while loading. Please reload this page.
2 parents 84cf742 + 4cddd41 commit f39de22Copy full SHA for f39de22
1 file changed
lib/private/Files/Storage/Wrapper/PermissionsMask.php
@@ -62,7 +62,9 @@ public function getPermissions(string $path): int {
62
63
public function rename(string $source, string $target): bool {
64
//This is a rename of the transfer file to the original file
65
- if (dirname($source) === dirname($target) && strpos($source, '.ocTransferId') > 0) {
+ $sourceDir = dirname($source);
66
+ $targetDir = dirname($target);
67
+ if (($sourceDir === $targetDir || $sourceDir === dirname($targetDir)) && strpos($source, '.ocTransferId') > 0) {
68
return $this->checkMask(Constants::PERMISSION_CREATE) && parent::rename($source, $target);
69
}
70
return $this->checkMask(Constants::PERMISSION_UPDATE) && parent::rename($source, $target);
0 commit comments