From 93a2007e7eb167c257aa54421bd1f6d72d281b79 Mon Sep 17 00:00:00 2001 From: sr55 Date: Sun, 6 Dec 2009 17:37:19 +0000 Subject: [PATCH] WinGui: - Make SourceName a bit smarter when dealing with autonaming and folders. If Video_TS folder is the selected source, autoname will now use the upper level folder name instead. (thanks slaingod) git-svn-id: svn://localhost/HandBrake/trunk@3009 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- win/C#/frmMain.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs index cdd062bb..c6fb58e6 100644 --- a/win/C#/frmMain.cs +++ b/win/C#/frmMain.cs @@ -192,8 +192,11 @@ namespace Handbrake { return this.dvdDriveLabel; } + + if(Path.GetFileNameWithoutExtension(this.sourcePath) != "VIDEO_TS") + return Path.GetFileNameWithoutExtension(this.sourcePath); - return Path.GetFileNameWithoutExtension(this.sourcePath); + return Path.GetFileNameWithoutExtension(Path.GetDirectoryName(this.sourcePath)); } } #endregion -- 2.11.0