]> granicus.if.org Git - handbrake/commitdiff
WinGui: Small improvement / fix to the Directory open code to allow it to highlight...
authorsr55 <sr55.hb@outlook.com>
Mon, 14 Oct 2019 11:17:02 +0000 (12:17 +0100)
committersr55 <sr55.hb@outlook.com>
Mon, 14 Oct 2019 11:17:02 +0000 (12:17 +0100)
win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs

index 5114949c4409a73d6a4d4a72ddbad39950be3262..1a0c67b6134422f0c0e3037fe8f5fbc516459a1a 100644 (file)
@@ -717,9 +717,16 @@ namespace HandBrakeWPF.ViewModels
             {\r
                 if (!string.IsNullOrEmpty(directory))\r
                 {\r
+                    if (File.Exists(directory))\r
+                    {\r
+                        string argument = "/select, \"" + directory + "\"";\r
+                        Process.Start("explorer.exe", argument);\r
+                        return;\r
+                    }\r
+                    \r
                     if (!File.Exists(directory) && !directory.EndsWith("\\"))\r
                     {\r
-                        directory = directory + "\\";\r
+                        directory = Path.GetDirectoryName(directory) + "\\";\r
                     }\r
 \r
                     directory = Path.GetDirectoryName(directory);\r