Selaa lähdekoodia

FileRefresher.IsFileLocked: Don't log Exceptions in case of no write permission

softworkz 9 vuotta sitten
vanhempi
sitoutus
b309e06cb8
1 muutettua tiedostoa jossa 5 lisäystä ja 0 poistoa
  1. 5 0
      MediaBrowser.Server.Implementations/IO/FileRefresher.cs

+ 5 - 0
MediaBrowser.Server.Implementations/IO/FileRefresher.cs

@@ -254,6 +254,11 @@ namespace MediaBrowser.Server.Implementations.IO
                 // File may have been deleted
                 return false;
             }
+            catch (UnauthorizedAccessException)
+            {
+                Logger.Debug("No write permission for: {0}.", path);
+                return false;
+            }
             catch (IOException)
             {
                 //the file is unavailable because it is: