use epoch timestamp instead of current timestamp for unknown modification times

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino
2022-08-16 17:59:13 +02:00
parent ced4206c5f
commit 2b463d61e3
20 changed files with 59 additions and 60 deletions

View File

@@ -722,7 +722,7 @@ func (u *User) FilterListDir(dirContents []os.FileInfo, virtualPath string) []os
for dir := range vdirs {
if fi.Name() == dir {
if !fi.IsDir() {
fi = vfs.NewFileInfo(dir, true, 0, time.Now(), false)
fi = vfs.NewFileInfo(dir, true, 0, time.Unix(0, 0), false)
dirContents[index] = fi
}
delete(vdirs, dir)
@@ -744,7 +744,7 @@ func (u *User) FilterListDir(dirContents []os.FileInfo, virtualPath string) []os
}
for dir := range vdirs {
fi := vfs.NewFileInfo(dir, true, 0, time.Now(), false)
fi := vfs.NewFileInfo(dir, true, 0, time.Unix(0, 0), false)
dirContents = append(dirContents, fi)
}
return dirContents