Fix a bug when creating Config directory

This commit is contained in:
Yeechan Lu 2014-03-23 16:58:19 +08:00
parent fc4778159c
commit 2554165963

View File

@ -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);