From 9fb7bd1367a9fe85689d33860ed44a998cb54d3a Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Mon, 17 Oct 2016 12:41:08 -0400 Subject: [PATCH] try to fix unhandled exception in file refresher --- .../IO/FileRefresher.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/MediaBrowser.Server.Implementations/IO/FileRefresher.cs b/MediaBrowser.Server.Implementations/IO/FileRefresher.cs index 3df7a03d4c..c2c776c2bb 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);