mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-03-14 01:34:47 +08:00
fix: 解决创建软连接失败的BUG
This commit is contained in:
parent
c54451c733
commit
9571d82932
@ -97,7 +97,7 @@ func (f FileService) Create(op request.FileCreate) error {
|
|||||||
return fo.CreateDir(op.Path, fs.FileMode(op.Mode))
|
return fo.CreateDir(op.Path, fs.FileMode(op.Mode))
|
||||||
} else {
|
} else {
|
||||||
if op.IsLink {
|
if op.IsLink {
|
||||||
if !fo.Stat(op.Path) {
|
if !fo.Stat(op.LinkPath) {
|
||||||
return buserr.New(constant.ErrLinkPathNotFound)
|
return buserr.New(constant.ErrLinkPathNotFound)
|
||||||
}
|
}
|
||||||
return fo.LinkFile(op.LinkPath, op.Path, op.IsSymlink)
|
return fo.LinkFile(op.LinkPath, op.Path, op.IsSymlink)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user