Skip to content

Commit

Permalink
fix panic on failed fs.LoadFs()
Browse files Browse the repository at this point in the history
  • Loading branch information
slayer committed Aug 8, 2024
1 parent 4eef089 commit a202228
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,9 @@ func (s *Server) loadFs(access *confpar.Access) (afero.Fs, error) {
}

newFs, err := fs.LoadFs(access, s.logger)
if err != nil {
return nil, err
}
if access.Shared {
s.logger.Debug("Saving fs instance for later use", "user", access.User, "fsType", newFs.Name())
cache.accesses[access.User] = newFs
Expand Down

0 comments on commit a202228

Please sign in to comment.