mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-19 13:10:13 -07:00
Ensure path is valid before watching it
This commit is contained in:
parent
108fc8c724
commit
1245b2c58b
1 changed files with 3 additions and 0 deletions
|
@ -116,6 +116,9 @@ namespace NzbDrone.Core.MediaFiles
|
||||||
|
|
||||||
private void StartWatchingPath(string path)
|
private void StartWatchingPath(string path)
|
||||||
{
|
{
|
||||||
|
Ensure.That(path, () => path).IsNotNullOrWhiteSpace();
|
||||||
|
Ensure.That(path, () => path).IsValidPath(PathValidationType.CurrentOs);
|
||||||
|
|
||||||
// Already being watched
|
// Already being watched
|
||||||
if (_fileSystemWatchers.ContainsKey(path))
|
if (_fileSystemWatchers.ContainsKey(path))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue