Skip to content

Commit

Permalink
[io] fix io exp
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinZonda committed Jun 25, 2020
1 parent 489f7ab commit 9d85fd4
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion NaiveSharp/View/About.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion NaiveSharp/View/MainWindow.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions NaiveSharp/View/MainWindow.cs
Expand Up @@ -13,6 +13,8 @@ public partial class MainWindow : Form
{
public MainWindow()
{
CheckPath();

// MessageBox.Show(File.ReadAllText(PATH.CONFIG_INI));
string runMode = LoadModeConfig();

Expand Down
13 changes: 13 additions & 0 deletions NaiveSharp/View/MainWindowsEx.cs
Expand Up @@ -196,5 +196,18 @@ private void SaveConfig()
}
File.WriteAllText(PATH.CONFIG_INI, $"mode = {Config.RunMode}");
}

private void CheckPath()
{
CheckDirectory(PATH.CONFIG);
}

private void CheckDirectory(string path)
{
if (!Directory.Exists(path))
{
Directory.CreateDirectory(path);
}
}
}
}

0 comments on commit 9d85fd4

Please sign in to comment.