diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-10-17 12:41:08 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-10-17 12:41:08 -0400 |
| commit | 9fb7bd1367a9fe85689d33860ed44a998cb54d3a (patch) | |
| tree | 00aa314e6eb6d809b02c5592bf6d52f17de16cee /MediaBrowser.Server.Implementations/IO/FileRefresher.cs | |
| parent | 716aef7e47fea61a003240d9df7f2575658eaea6 (diff) | |
try to fix unhandled exception in file refresher
Diffstat (limited to 'MediaBrowser.Server.Implementations/IO/FileRefresher.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/IO/FileRefresher.cs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/MediaBrowser.Server.Implementations/IO/FileRefresher.cs b/MediaBrowser.Server.Implementations/IO/FileRefresher.cs index 3df7a03d4..c2c776c2b 100644 --- a/MediaBrowser.Server.Implementations/IO/FileRefresher.cs +++ b/MediaBrowser.Server.Implementations/IO/FileRefresher.cs @@ -45,6 +45,11 @@ namespace MediaBrowser.Server.Implementations.IO private void AddAffectedPath(string path) { + if (string.IsNullOrWhiteSpace(path)) + { + throw new ArgumentNullException("path"); + } + if (!_affectedPaths.Contains(path, StringComparer.Ordinal)) { _affectedPaths.Add(path); @@ -53,6 +58,11 @@ namespace MediaBrowser.Server.Implementations.IO public void AddPath(string path) { + if (string.IsNullOrWhiteSpace(path)) + { + throw new ArgumentNullException("path"); + } + lock (_timerLock) { AddAffectedPath(path); |
