EventManager: always close the connection filesystem

closing the user filesystem is not enough here

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino
2024-11-20 20:51:20 +01:00
parent 4a414f0fa4
commit ebc085da77
2 changed files with 18 additions and 0 deletions

View File

@@ -575,6 +575,7 @@ func validateBrowsableShare(share dataprovider.Share, connection *Connection) er
basePath := share.Paths[0]
info, err := connection.Stat(basePath, 0)
if err != nil {
connection.CloseFS() //nolint:errcheck
return util.NewI18nError(
fmt.Errorf("unable to check the share directory: %w", err),
util.I18nErrorShareInvalidPath,