Skip to content

Commit ce27eff

Browse files
committed
Dont overwrite existing config
1 parent efb220e commit ce27eff

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

WslToolbox.UI.Core/Helpers/Toolbox.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,20 @@ public static AppTypes GetAppType()
3636
public static void CopyOldConfiguration()
3737
{
3838
var oldDirectory = Path.Combine(AppInstallDir, "data");
39+
var newDirectory = AppDirectory;
3940
if (!Directory.Exists(oldDirectory))
4041
{
4142
return;
4243
}
4344

45+
if (File.Exists(Toolbox.UserConfiguration))
46+
{
47+
Log.Logger.Information("User configuration already exist");
48+
49+
return;
50+
}
51+
52+
4453
try
4554
{
4655
DirectoryHelper.CopyDirectory(oldDirectory, AppDirectory, true);

0 commit comments

Comments
 (0)