diff --git a/src/NzbDrone.Core/MediaFiles/RootFolderWatchingService.cs b/src/NzbDrone.Core/MediaFiles/RootFolderWatchingService.cs index 5e088211f..b674bdb07 100644 --- a/src/NzbDrone.Core/MediaFiles/RootFolderWatchingService.cs +++ b/src/NzbDrone.Core/MediaFiles/RootFolderWatchingService.cs @@ -6,6 +6,7 @@ using System.Threading.Tasks; using NLog; using NzbDrone.Common.Disk; +using NzbDrone.Common.EnsureThat; using NzbDrone.Common.Extensions; using NzbDrone.Common.TPL; using NzbDrone.Core.Configuration; @@ -116,6 +117,9 @@ public void Handle(ModelEvent message) private void StartWatchingPath(string path) { + Ensure.That(path, () => path).IsNotNullOrWhiteSpace(); + Ensure.That(path, () => path).IsValidPath(PathValidationType.CurrentOs); + // Already being watched if (_fileSystemWatchers.ContainsKey(path)) {