符号链接支持,可以通过mklink(Windows)或者ln -s (Linux)将其他路径下的文件夹链接到根目录下而无需将文件复制到根目录下.针对删除场景特殊处理,删除整个符号链接目录不会删除链接目录内文件,仅删除链接,在符号链接目录操作同普通目录

This commit is contained in:
wenyifan
2022-07-02 14:32:02 +08:00
parent 1ec66adda0
commit 3f38998fe5
7 changed files with 43 additions and 30 deletions

View File

@ -176,7 +176,7 @@ func Props(ctx context.Context, fs FileSystem, ls LockSystem, name string, pname
if err != nil {
return nil, err
}
isDir := fi.IsDir()
isDir := fi.IsDir() || (fi.Mode()&os.ModeSymlink > 0)
var deadProps map[xml.Name]Property
if dph, ok := f.(DeadPropsHolder); ok {