Merge pull request #88 from Yuanuo/patch-02

PHP basename 中文乱码问题
This commit is contained in:
AaronLiu 2018-09-15 19:36:54 +08:00 committed by GitHub
commit 1693bf800b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;
}