mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 23:00:55 +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:
@@ -600,7 +600,7 @@ func (c *BaseConnection) DoStat(virtualPath string, mode int, checkFilePatterns
|
||||
// if virtualPath is a virtual folder
|
||||
vfolders := c.User.GetVirtualFoldersInPath(path.Dir(virtualPath))
|
||||
if _, ok := vfolders[virtualPath]; ok {
|
||||
return vfs.NewFileInfo(virtualPath, true, 0, time.Now(), false), nil
|
||||
return vfs.NewFileInfo(virtualPath, true, 0, time.Unix(0, 0), false), nil
|
||||
}
|
||||
if checkFilePatterns {
|
||||
ok, policy := c.User.IsFileAllowed(virtualPath)
|
||||
|
||||
Reference in New Issue
Block a user