mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 06:40:54 +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:
@@ -745,7 +745,7 @@ func (s *httpdServer) handleShareGetFiles(w http.ResponseWriter, r *http.Request
|
||||
|
||||
var info os.FileInfo
|
||||
if name == "/" {
|
||||
info = vfs.NewFileInfo(name, true, 0, time.Now(), false)
|
||||
info = vfs.NewFileInfo(name, true, 0, time.Unix(0, 0), false)
|
||||
} else {
|
||||
info, err = connection.Stat(name, 1)
|
||||
}
|
||||
@@ -879,7 +879,7 @@ func (s *httpdServer) handleClientGetFiles(w http.ResponseWriter, r *http.Reques
|
||||
name := connection.User.GetCleanedPath(r.URL.Query().Get("path"))
|
||||
var info os.FileInfo
|
||||
if name == "/" {
|
||||
info = vfs.NewFileInfo(name, true, 0, time.Now(), false)
|
||||
info = vfs.NewFileInfo(name, true, 0, time.Unix(0, 0), false)
|
||||
} else {
|
||||
info, err = connection.Stat(name, 0)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user