From c95b467ad33ce9b2e157ca83629f45e67f7e2ad1 Mon Sep 17 00:00:00 2001 From: sr55 Date: Mon, 3 Jan 2011 14:48:49 +0000 Subject: WinGui: - Fix for the autonaming when a drive letter is selected in folder mode. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3726 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- win/C#/HandBrake.ApplicationServices/Model/Job.cs | 3 +++ win/C#/frmMain.cs | 13 +++++++++++++ 2 files changed, 16 insertions(+) diff --git a/win/C#/HandBrake.ApplicationServices/Model/Job.cs b/win/C#/HandBrake.ApplicationServices/Model/Job.cs index 07f84b4f3..a18a6117c 100644 --- a/win/C#/HandBrake.ApplicationServices/Model/Job.cs +++ b/win/C#/HandBrake.ApplicationServices/Model/Job.cs @@ -10,6 +10,9 @@ namespace HandBrake.ApplicationServices.Model /// public class Job { + /// + /// the CLI Query. + /// private string query; /// diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs index 4d341731d..1f2e15bfa 100644 --- a/win/C#/frmMain.cs +++ b/win/C#/frmMain.cs @@ -83,6 +83,19 @@ namespace Handbrake return Path.GetFileName(selectedTitle.SourceName); } + // We have a drive, selected as a folder. + if (this.sourcePath.EndsWith("\\")) + { + drives = Main.GetDrives(); + foreach (DriveInformation item in drives) + { + if (item.RootDirectory.Contains(this.sourcePath)) + { + return item.VolumeLabel; + } + } + } + if (Path.GetFileNameWithoutExtension(this.sourcePath) != "VIDEO_TS") return Path.GetFileNameWithoutExtension(this.sourcePath); -- cgit v1.2.3