mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-08 23:28:39 +03:00
always execute fs checks for users not logged in after an update
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -211,7 +211,9 @@ func (u *User) CheckFsRoot(connectionID string) error {
|
||||
}
|
||||
}
|
||||
if isLastActivityRecent(u.LastLogin, delay) {
|
||||
return nil
|
||||
if u.LastLogin > u.UpdatedAt {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
fs, err := u.GetFilesystemForPath("/", connectionID)
|
||||
if err != nil {
|
||||
@@ -258,7 +260,7 @@ func (u *User) GetCleanedPath(rawVirtualPath string) string {
|
||||
return util.CleanPath(rawVirtualPath)
|
||||
}
|
||||
|
||||
// isFsEqual returns true if the fs has the same configuration
|
||||
// isFsEqual returns true if the filesystem configurations are the same
|
||||
func (u *User) isFsEqual(other *User) bool {
|
||||
if u.FsConfig.Provider == sdk.LocalFilesystemProvider && u.GetHomeDir() != other.GetHomeDir() {
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user