mirror of https://github.com/lidarr/Lidarr
Ensure path is valid before watching it
This commit is contained in:
parent
108fc8c724
commit
1245b2c58b
|
@ -116,6 +116,9 @@ namespace NzbDrone.Core.MediaFiles
|
|||
|
||||
private void StartWatchingPath(string path)
|
||||
{
|
||||
Ensure.That(path, () => path).IsNotNullOrWhiteSpace();
|
||||
Ensure.That(path, () => path).IsValidPath(PathValidationType.CurrentOs);
|
||||
|
||||
// Already being watched
|
||||
if (_fileSystemWatchers.ContainsKey(path))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue