OSDN Git Service

WinGui:
authorsr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Sun, 6 Dec 2009 17:37:19 +0000 (17:37 +0000)
committersr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Sun, 6 Dec 2009 17:37:19 +0000 (17:37 +0000)
- 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

index cdd062b..c6fb58e 100644 (file)
@@ -192,8 +192,11 @@ namespace Handbrake
                 {\r
                     return this.dvdDriveLabel;\r
                 }\r
+                \r
+                if(Path.GetFileNameWithoutExtension(this.sourcePath) != "VIDEO_TS")\r
+                    return Path.GetFileNameWithoutExtension(this.sourcePath);\r
 \r
-                return Path.GetFileNameWithoutExtension(this.sourcePath);\r
+                return Path.GetFileNameWithoutExtension(Path.GetDirectoryName(this.sourcePath));\r
             }\r
         }\r
         #endregion\r