mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-08 23:28:39 +03:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user