Răsfoiți Sursa

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

softworkz 9 ani în urmă
părinte
comite
b309e06cb8
1 a modificat fișierele cu 5 adăugiri și 0 ștergeri
  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
                 // File may have been deleted
                 return false;
                 return false;
             }
             }
+            catch (UnauthorizedAccessException)
+            {
+                Logger.Debug("No write permission for: {0}.", path);
+                return false;
+            }
             catch (IOException)
             catch (IOException)
             {
             {
                 //the file is unavailable because it is:
                 //the file is unavailable because it is: