]> granicus.if.org Git - handbrake/commitdiff
WinGui: Setting the Initial Directory to null when we can't resolve a full path to...
authorsr55 <sr55.hb@outlook.com>
Tue, 30 Jul 2013 17:54:38 +0000 (17:54 +0000)
committersr55 <sr55.hb@outlook.com>
Tue, 30 Jul 2013 17:54:38 +0000 (17:54 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5676 b64f7644-9d1e-0410-96f1-a4d463321fa5

win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs

index 474185776b1f02955064b76dbc90009a4989e2d4..0fea49d58269ef8bced3c29581896174b639353f 100644 (file)
@@ -1418,10 +1418,9 @@ namespace HandBrakeWPF.ViewModels
 \r
             if (this.CurrentTask != null && !string.IsNullOrEmpty(this.CurrentTask.Destination))\r
             {\r
-                if (Directory.Exists(Path.GetDirectoryName(this.CurrentTask.Destination)))\r
-                {\r
-                    saveFileDialog.InitialDirectory = Path.GetDirectoryName(this.CurrentTask.Destination) + "\\";\r
-                }\r
+                saveFileDialog.InitialDirectory = Directory.Exists(Path.GetDirectoryName(this.CurrentTask.Destination))\r
+                                                      ? Path.GetDirectoryName(this.CurrentTask.Destination) + "\\"\r
+                                                      : null;\r
 \r
                 saveFileDialog.FileName = Path.GetFileName(this.CurrentTask.Destination);\r
             }\r