diff options
| author | Brian Howe <30811239+bhowe34@users.noreply.github.com> | 2024-09-19 08:12:32 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-19 07:12:32 -0600 |
| commit | 03aa37731b39135e3b3be3f8751f3018d7427d10 (patch) | |
| tree | 2b39fb2b5cfd27862f8960ed2298801f7bed0445 | |
| parent | 9c4bf48b4ea85aac30d96d70a198247e56a6323d (diff) | |
Watch library directories with perm errors (#10684)
| -rw-r--r-- | Emby.Server.Implementations/IO/LibraryMonitor.cs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Emby.Server.Implementations/IO/LibraryMonitor.cs b/Emby.Server.Implementations/IO/LibraryMonitor.cs index 31617d1a5..6af2a553d 100644 --- a/Emby.Server.Implementations/IO/LibraryMonitor.cs +++ b/Emby.Server.Implementations/IO/LibraryMonitor.cs @@ -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); |
