mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-04 11:59:07 +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);
|
string configPath = Path.Combine(configFolder, ConfigName + fileSuffix);
|
||||||
if (!File.Exists(configPath))
|
if (!File.Exists(configPath))
|
||||||
{
|
{
|
||||||
FileInfo fileInfo = new FileInfo(configFolder);
|
if (!Directory.Exists(configFolder))
|
||||||
if (!fileInfo.Directory.Exists)
|
Directory.CreateDirectory(configFolder);
|
||||||
{
|
|
||||||
fileInfo.Directory.Create();
|
|
||||||
}
|
|
||||||
File.Create(configPath).Close();
|
File.Create(configPath).Close();
|
||||||
}
|
}
|
||||||
string json = File.ReadAllText(configPath);
|
string json = File.ReadAllText(configPath);
|
||||||
|
Loading…
Reference in New Issue
Block a user