From: sr55 Date: Sun, 6 Dec 2009 17:37:19 +0000 (+0000) Subject: WinGui: X-Git-Url: http://git.osdn.jp/view?a=commitdiff_plain;ds=sidebyside;h=93a2007e7eb167c257aa54421bd1f6d72d281b79;p=handbrake-jp%2Fhandbrake-jp-git.git 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 --- 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