@@ -326,7 +326,9 @@ public function rename($path1, $path2) {
326
326
$ postFix2 =(substr ($ path2 ,-1 ,1 )==='/ ' )?'/ ' :'' ;
327
327
$ absolutePath1 = OC_Filesystem::normalizePath ($ this ->getAbsolutePath ($ path1 ));
328
328
$ absolutePath2 = OC_Filesystem::normalizePath ($ this ->getAbsolutePath ($ path2 ));
329
- if (OC_FileProxy::runPreProxies ('rename ' , $ absolutePath1 , $ absolutePath2 ) and OC_Filesystem::isValidPath ($ path2 )) {
329
+ if (OC_FileProxy::runPreProxies ('rename ' , $ absolutePath1 , $ absolutePath2 )
330
+ and OC_Filesystem::isValidPath ($ path1 )
331
+ and OC_Filesystem::isValidPath ($ path2 )) {
330
332
$ path1 = $ this ->getRelativePath ($ absolutePath1 );
331
333
$ path2 = $ this ->getRelativePath ($ absolutePath2 );
332
334
@@ -378,7 +380,9 @@ public function copy($path1, $path2) {
378
380
$ postFix2 =(substr ($ path2 ,-1 ,1 )==='/ ' )?'/ ' :'' ;
379
381
$ absolutePath1 = OC_Filesystem::normalizePath ($ this ->getAbsolutePath ($ path1 ));
380
382
$ absolutePath2 = OC_Filesystem::normalizePath ($ this ->getAbsolutePath ($ path2 ));
381
- if (OC_FileProxy::runPreProxies ('copy ' , $ absolutePath1 , $ absolutePath2 ) and OC_Filesystem::isValidPath ($ path2 )) {
383
+ if (OC_FileProxy::runPreProxies ('copy ' , $ absolutePath1 , $ absolutePath2 )
384
+ and OC_Filesystem::isValidPath ($ path1 )
385
+ and OC_Filesystem::isValidPath ($ path2 )) {
382
386
$ path1 = $ this ->getRelativePath ($ absolutePath1 );
383
387
$ path2 = $ this ->getRelativePath ($ absolutePath2 );
384
388
0 commit comments