If program files folder does not exist do not try to create an

Uri from null.
This commit is contained in:
2017-05-18 16:31:46 +01:00
parent 3edfba922b
commit c17ef11819
2 changed files with 8 additions and 1 deletions

View File

@@ -0,0 +1,6 @@
2017-05-18 Natalia Portillo <claunia@claunia.com>
* dlgSettings.xeto.cs:
If program files folder does not exist do not try to create
an Uri from null.

View File

@@ -91,7 +91,8 @@ namespace osrepodbmgr.Eto
OpenFileDialog dlgFile = new OpenFileDialog();
dlgFile.Title = "Choose UnArchiver executable";
dlgFile.MultiSelect = false;
dlgFile.Directory = new Uri(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles));
if(!string.IsNullOrWhiteSpace(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles)))
dlgFile.Directory = new Uri(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles));
if(dlgFile.ShowDialog(this) == DialogResult.Ok)
{