Compare commits
1 commit
main
...
users/davi
Author | SHA1 | Date | |
---|---|---|---|
|
60f6418720 |
|
@ -1,10 +1,13 @@
|
||||||
// Copyright (c) Microsoft Corporation
|
// Copyright (c) Microsoft Corporation
|
||||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||||
// See the LICENSE file in the project root for more information.
|
// See the LICENSE file in the project root for more information.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
using Wox.Infrastructure.Storage;
|
using Wox.Infrastructure.Storage;
|
||||||
|
using Wox.Plugin.Logger;
|
||||||
|
|
||||||
namespace Microsoft.Plugin.Program.Storage
|
namespace Microsoft.Plugin.Program.Storage
|
||||||
{
|
{
|
||||||
|
@ -33,7 +36,18 @@ namespace Microsoft.Plugin.Program.Storage
|
||||||
Environment.GetFolderPath(Environment.SpecialFolder.Desktop),
|
Environment.GetFolderPath(Environment.SpecialFolder.Desktop),
|
||||||
Environment.GetFolderPath(Environment.SpecialFolder.CommonDesktopDirectory),
|
Environment.GetFolderPath(Environment.SpecialFolder.CommonDesktopDirectory),
|
||||||
};
|
};
|
||||||
return paths;
|
|
||||||
|
var invalidPaths = new List<string>();
|
||||||
|
foreach (var path in paths)
|
||||||
|
{
|
||||||
|
if (!Directory.Exists(path))
|
||||||
|
{
|
||||||
|
Log.Warn($"Directory {path} does not exist and will be ignored", typeof(Win32ProgramFileSystemWatchers));
|
||||||
|
invalidPaths.Add(path);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return paths.Except(invalidPaths).ToArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initializes the FileSystemWatchers
|
// Initializes the FileSystemWatchers
|
||||||
|
|
Loading…
Reference in a new issue