This commit is contained in:
wenyifan
2022-07-02 14:49:47 +08:00
parent 3f38998fe5
commit 4687aa64ec

View File

@ -416,8 +416,8 @@ func (this *MatterDao) Delete(matter *Matter, symbolLinkDir bool, symbolLevel in
// recursive if dir
if matter.Dir {
stat, _ := os.Lstat(matter.AbsolutePath())
if stat.Mode()&os.ModeSymlink > 0 {
stat, err := os.Lstat(matter.AbsolutePath())
if err == nil && stat.Mode()&os.ModeSymlink > 0 {
symbolLinkDir = true
}
if symbolLinkDir {