|
|
@ -314,6 +314,12 @@ namespace Emby.Server.Implementations.IO
|
|
|
|
var ex = e.GetException();
|
|
|
|
var ex = e.GetException();
|
|
|
|
var dw = (FileSystemWatcher)sender;
|
|
|
|
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);
|
|
|
|
_logger.LogError(ex, "Error in Directory watcher for: {Path}", dw.Path);
|
|
|
|
|
|
|
|
|
|
|
|
DisposeWatcher(dw, true);
|
|
|
|
DisposeWatcher(dw, true);
|
|
|
|