mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-12 02:09:24 +08:00
Fix a bug when creating Config directory
This commit is contained in:
parent
fc4778159c
commit
2554165963
@ -41,11 +41,8 @@ namespace Wox.Infrastructure.Storage
|
||||
string configPath = Path.Combine(configFolder, ConfigName + fileSuffix);
|
||||
if (!File.Exists(configPath))
|
||||
{
|
||||
FileInfo fileInfo = new FileInfo(configFolder);
|
||||
if (!fileInfo.Directory.Exists)
|
||||
{
|
||||
fileInfo.Directory.Create();
|
||||
}
|
||||
if (!Directory.Exists(configFolder))
|
||||
Directory.CreateDirectory(configFolder);
|
||||
File.Create(configPath).Close();
|
||||
}
|
||||
string json = File.ReadAllText(configPath);
|
||||
|
Loading…
Reference in New Issue
Block a user