fix: 解决创建软连接失败的BUG

This commit is contained in:
zhengkunwang223 2023-03-12 11:09:38 +08:00 committed by zhengkunwang223
parent c54451c733
commit 9571d82932

View File

@ -97,7 +97,7 @@ func (f FileService) Create(op request.FileCreate) error {
return fo.CreateDir(op.Path, fs.FileMode(op.Mode))
} else {
if op.IsLink {
if !fo.Stat(op.Path) {
if !fo.Stat(op.LinkPath) {
return buserr.New(constant.ErrLinkPathNotFound)
}
return fo.LinkFile(op.LinkPath, op.Path, op.IsSymlink)