aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/IO/FileRefresher.cs
diff options
context:
space:
mode:
authorhatharry <hatharry@hotmail.com>2016-08-29 01:27:43 +1200
committerhatharry <hatharry@hotmail.com>2016-08-29 01:27:43 +1200
commitcabf2cdc1be4c06714ac6bcf835a19d2f652a6e2 (patch)
treed375b8a41e9fd40a2569ceea6b02e4f8237db797 /MediaBrowser.Server.Implementations/IO/FileRefresher.cs
parente564b54686029a90595e1bb4277f87490763e183 (diff)
parentc974641a352685b2e6595dd7b291843c8e6364ac (diff)
Merge branch 'dev' of https://github.com/hatharry/Emby.git
Diffstat (limited to 'MediaBrowser.Server.Implementations/IO/FileRefresher.cs')
-rw-r--r--MediaBrowser.Server.Implementations/IO/FileRefresher.cs12
1 files changed, 12 insertions, 0 deletions
diff --git a/MediaBrowser.Server.Implementations/IO/FileRefresher.cs b/MediaBrowser.Server.Implementations/IO/FileRefresher.cs
index f48beacb5..2f4605c5c 100644
--- a/MediaBrowser.Server.Implementations/IO/FileRefresher.cs
+++ b/MediaBrowser.Server.Implementations/IO/FileRefresher.cs
@@ -61,6 +61,11 @@ namespace MediaBrowser.Server.Implementations.IO
public void RestartTimer()
{
+ if (_disposed)
+ {
+ return;
+ }
+
lock (_timerLock)
{
if (_timer == null)
@@ -254,6 +259,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:
@@ -281,8 +291,10 @@ namespace MediaBrowser.Server.Implementations.IO
}
}
+ private bool _disposed;
public void Dispose()
{
+ _disposed = true;
DisposeTimer();
}
}