From: sr55 Date: Thu, 19 Jul 2018 20:09:01 +0000 (+0100) Subject: WinGui: Better handle Open Source Directory on the Queue where batch scan is used... X-Git-Tag: 1.2.0~227 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f039027f79cb347f960f5ca69d15b3abdf406773;p=handbrake WinGui: Better handle Open Source Directory on the Queue where batch scan is used. Fixes #1491 --- diff --git a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs index c6fa2848a..12f23edf6 100644 --- a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs @@ -555,6 +555,11 @@ namespace HandBrakeWPF.ViewModels { if (!string.IsNullOrEmpty(directory)) { + if (!File.Exists(directory) && !directory.EndsWith("\\")) + { + directory = directory + "\\"; + } + directory = Path.GetDirectoryName(directory); if (directory != null && Directory.Exists(directory)) {