File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
lib/private/Files/Storage/Wrapper Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -80,13 +80,9 @@ public function getPermissions($path) {
8080 }
8181
8282 public function rename ($ path1 , $ path2 ) {
83- $ p = strpos ($ path1 , $ path2 );
84- if ($ p === 0 ) {
85- $ part = substr ($ path1 , strlen ($ path2 ));
86- //This is a rename of the transfer file to the original file
87- if (strpos ($ part , '.ocTransferId ' ) === 0 ) {
88- return $ this ->checkMask (Constants::PERMISSION_CREATE ) and parent ::rename ($ path1 , $ path2 );
89- }
83+ //This is a rename of the transfer file to the original file
84+ if (dirname ($ path1 ) === dirname ($ path2 ) && strpos ($ path1 , '.ocTransferId ' ) > 0 ) {
85+ return $ this ->checkMask (Constants::PERMISSION_CREATE ) and parent ::rename ($ path1 , $ path2 );
9086 }
9187 return $ this ->checkMask (Constants::PERMISSION_UPDATE ) and parent ::rename ($ path1 , $ path2 );
9288 }
You can’t perform that action at this time.
0 commit comments