Skip to content

Commit

Permalink
Add some debug code for issue #103
Browse files Browse the repository at this point in the history
  • Loading branch information
alexhauser committed Apr 13, 2020
1 parent 922eaf8 commit 09def4c
Showing 1 changed file with 20 additions and 10 deletions.
30 changes: 20 additions & 10 deletions SQRLPlatformAwareInstaller/ViewModels/VersionSelectorViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -440,18 +440,28 @@ private void Wc_DownloadProgressChanged(object sender, DownloadProgressChangedEv
/// </summary>
public async void FolderPicker()
{
OpenFolderDialog ofd = new OpenFolderDialog
try
{
Directory = Path.GetDirectoryName(this.InstallationPath),
Title = _loc.GetLocalizationValue("TitleChooseInstallFolderDialog")
};
var result = await ofd.ShowAsync(_mainWindow);
if (!string.IsNullOrEmpty(result))
OpenFolderDialog ofd = new OpenFolderDialog
{
Directory = Path.GetDirectoryName(this.InstallationPath),
Title = _loc.GetLocalizationValue("TitleChooseInstallFolderDialog")
};
var result = await ofd.ShowAsync(_mainWindow);
if (!string.IsNullOrEmpty(result))
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
this.InstallationPath = Path.Combine(result);
else
this.InstallationPath = Path.Combine(result, "SQRL");
}
}
catch (Exception ex)
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
this.InstallationPath = Path.Combine(result);
else
this.InstallationPath = Path.Combine(result, "SQRL");
Log.Error("Error showing install folder selection dialog!");
Log.Error(ex.Message);
Log.Error(ex.StackTrace);
throw (ex);
}
}

Expand Down

0 comments on commit 09def4c

Please sign in to comment.