提交 12f7f691 编写于 作者: H HFO4

修复因目录重名无法创建目录

上级 2d183acd
......@@ -1076,7 +1076,7 @@ class FileManage extends Model{
if(empty($dirName)){
return ["result"=>["success"=>false,"error"=>"目录名不能为空"]];
}
if(Db::name('folders')->where('position_absolute',$dirPosition)->find() ==null || Db::name('folders')->where('position',$dirPosition)->where('folder_name',$dirName)->find() !=null || Db::name('files')->where('dir',$dirPosition)->where('pre_name',$dirName)->find() !=null){
if(Db::name('folders')->where('position_absolute',$dirPosition)->where('owner',$uid)->find() ==null || Db::name('folders')->where('owner',$uid)->where('position',$dirPosition)->where('folder_name',$dirName)->find() !=null || Db::name('files')->where('upload_date',$uid)->where('dir',$dirPosition)->where('pre_name',$dirName)->find() !=null){
return ["result"=>["success"=>false,"error"=>"路径不存在或文件已存在"]];
}
$sqlData = [
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册