Skip to content

Commit

Permalink
Minor
Browse files Browse the repository at this point in the history
  • Loading branch information
rampaa committed Jan 16, 2025
1 parent ec04760 commit a7c78ce
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions JL.Windows/GUI/AddProfileWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,17 @@ private async void SaveButton_Click(object sender, RoutedEventArgs e)
Close();

_ = Directory.CreateDirectory(ProfileUtils.ProfileFolderPath);
await File.Create(ProfileUtils.GetProfileCustomNameDictPath(profileName)).DisposeAsync().ConfigureAwait(false);
await File.Create(ProfileUtils.GetProfileCustomWordDictPath(profileName)).DisposeAsync().ConfigureAwait(false);
string custonNamePath = ProfileUtils.GetProfileCustomNameDictPath(profileName);
if (!File.Exists(custonNamePath))
{
await File.Create(custonNamePath).DisposeAsync().ConfigureAwait(false);
}

string customWordPath = ProfileUtils.GetProfileCustomWordDictPath(profileName);
if (!File.Exists(customWordPath))
{
await File.Create(customWordPath).DisposeAsync().ConfigureAwait(false);
}
}

private void Window_Loaded(object sender, RoutedEventArgs e)
Expand Down

0 comments on commit a7c78ce

Please sign in to comment.