From 25541659630e439134424c83040993ab648289fe Mon Sep 17 00:00:00 2001 From: Yeechan Lu Date: Sun, 23 Mar 2014 16:58:19 +0800 Subject: [PATCH] Fix a bug when creating Config directory --- Wox.Infrastructure/Storage/BaseStorage.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Wox.Infrastructure/Storage/BaseStorage.cs b/Wox.Infrastructure/Storage/BaseStorage.cs index 94fd9ecc63..01363cf1a3 100644 --- a/Wox.Infrastructure/Storage/BaseStorage.cs +++ b/Wox.Infrastructure/Storage/BaseStorage.cs @@ -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);