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:
Nicola Murino
2022-03-03 19:31:54 +01:00
parent 5c2fd8d52a
commit 056daaddfc
6 changed files with 47 additions and 9 deletions

View File

@@ -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