From 2807c1c79eb170caab55b9d6356ebcd2972304c9 Mon Sep 17 00:00:00 2001 From: Yuanuo Date: Sat, 4 Aug 2018 14:08:59 +0800 Subject: [PATCH 1/2] =?UTF-8?q?PHP=20basename=20=E4=B8=AD=E6=96=87?= =?UTF-8?q?=E4=B9=B1=E7=A0=81=E9=97=AE=E9=A2=98=20php=20basename()?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E8=8E=B7=E5=8F=96=E5=B8=A6=E4=B8=AD=E6=96=87?= =?UTF-8?q?=E5=AD=97=E7=AC=A6=E7=9A=84=E6=96=87=E4=BB=B6=E5=90=8D(?= =?UTF-8?q?=E4=B9=B1=E7=A0=81)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/index/model/Directory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/index/model/Directory.php b/application/index/model/Directory.php index 8c6e27dd..2760168d 100644 --- a/application/index/model/Directory.php +++ b/application/index/model/Directory.php @@ -168,7 +168,7 @@ class Directory extends DAV\Node implements DAV\ICollection, DAV\IQuota{ $dirName = end($explode); $rootPath = rtrim($path,"/".$dirName); $rootPath = empty($rootPath) ? "/" : $rootPath; - $dirData = Db::name('folders')->where('owner',$this->uid)->where('position',dirname($path) == "\\" ?"/":dirname($path))->where("folder_name",basename($path))->find(); + $dirData = Db::name('folders')->where('owner',$this->uid)->where('position',dirname($path) == "\\" ?"/":dirname($path))->where("folder_name",getDirName($path))->find(); if(empty($dirData)){ return false; } From f39334125bccfe40aad3b940b75ad1c653d91f16 Mon Sep 17 00:00:00 2001 From: Samuel NELA Date: Fri, 14 Sep 2018 23:34:33 +0200 Subject: [PATCH 2/2] moved to psr-4 --- composer.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 73b481b2..275ae2ab 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,7 @@ "keywords": ["php", "cloud", "ThinkPHP", "file-sharing"], "homepage": "https://cloudreve.org", "type": "project", - "license": "GPL-3.0-only", + "license": "GPL-3.0-only", "authors": [ { "name": "Aaron", @@ -35,8 +35,8 @@ "upyun/sdk": "^3.3" }, "autoload": { - "psr-0": { - "CloudreveInstaller\\Installer" : "" + "psr-4": { + "CloudreveInstaller\\Installer\\" : "" } }, "scripts": {