fix: Symlinks not flagged as symlinks in file listing

This commit is contained in:
Daniel Barton 2024-07-28 17:39:44 +08:00
parent d739948989
commit 27919a4ab2

View File

@ -38,7 +38,7 @@ func (s *Stat) MarshalJSON() ([]byte, error) {
Size: s.Size(),
Directory: s.IsDir(),
File: !s.IsDir(),
Symlink: s.Mode().Perm()&ufs.ModeSymlink != 0,
Symlink: s.Mode().Type()&ufs.ModeSymlink != 0,
Mime: s.Mimetype,
})
}