From: Xuanwo Date: Tue, 14 Mar 2017 05:27:17 +0000 (+0800) Subject: [OC/Files/Cache]: Fix wrong usage of basename X-Git-Tag: v12.0.0beta1~429^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=210f4106c4442e2f7ac0ed9211961b52f75e6146;p=nextcloud-server.git [OC/Files/Cache]: Fix wrong usage of basename Fix https://github.com/nextcloud/server/issues/3837 Signed-off-by: Xuanwo --- diff --git a/lib/private/Files/Cache/Cache.php b/lib/private/Files/Cache/Cache.php index 95a78f99829..9c3b786ae87 100644 --- a/lib/private/Files/Cache/Cache.php +++ b/lib/private/Files/Cache/Cache.php @@ -17,6 +17,7 @@ * @author TheSFReader * @author Thomas Müller * @author Vincent Petry + * @author Xuanwo * * @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);