Watch library directories with perm errors (#10684)

pull/9726/merge
Brian Howe 4 months ago committed by GitHub
parent 9c4bf48b4e
commit 03aa37731b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -314,6 +314,12 @@ namespace Emby.Server.Implementations.IO
var ex = e.GetException();
var dw = (FileSystemWatcher)sender;
if (ex is UnauthorizedAccessException unauthorizedAccessException)
{
_logger.LogError(unauthorizedAccessException, "Permission error for Directory watcher: {Path}", dw.Path);
return;
}
_logger.LogError(ex, "Error in Directory watcher for: {Path}", dw.Path);
DisposeWatcher(dw, true);

Loading…
Cancel
Save