]> source.dussan.org Git - nextcloud-server.git/commitdiff
[OC/Files/Cache]: Fix wrong usage of basename 3838/head
authorXuanwo <xuanwo@yunify.com>
Tue, 14 Mar 2017 05:27:17 +0000 (13:27 +0800)
committerXuanwo <xuanwo@yunify.com>
Tue, 14 Mar 2017 05:27:17 +0000 (13:27 +0800)
Fix https://github.com/nextcloud/server/issues/3837

Signed-off-by: Xuanwo <xuanwo@yunify.com>
lib/private/Files/Cache/Cache.php

index 95a78f998291a4f9ec9cb12343aeb7606b61bc9f..9c3b786ae87fe8ec96de9b1aaeb58d11d22aef21 100644 (file)
@@ -17,6 +17,7 @@
  * @author TheSFReader <TheSFReader@gmail.com>
  * @author Thomas Müller <thomas.mueller@tmit.eu>
  * @author Vincent Petry <pvince81@owncloud.com>
+ * @author Xuanwo <xuanwo@yunify.com>
  *
  * @license AGPL-3.0
  *
@@ -532,7 +533,7 @@ class Cache implements ICache {
                                $this->connection->executeQuery($moveSql, [$targetStorageId, $targetPath, md5($targetPath), basename($targetPath), $newParentId, $sourceId]);
                                $this->connection->commit();
                        } else {
-                               $this->connection->executeQuery($moveSql, [$targetStorageId, $targetPath, md5($targetPath), basename($targetPath), $newParentId, $sourceId]);
+                               $this->connection->executeQuery($moveSql, [$targetStorageId, $targetPath, md5($targetPath), \OC_Util::basename($targetPath), $newParentId, $sourceId]);
                        }
                } else {
                        $this->moveFromCacheFallback($sourceCache, $sourcePath, $targetPath);