OSDN Git Service

WinGui:
authorsr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Mon, 3 Jan 2011 14:48:49 +0000 (14:48 +0000)
committersr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Mon, 3 Jan 2011 14:48:49 +0000 (14:48 +0000)
- Fix for the autonaming when a drive letter is selected in folder mode.

git-svn-id: svn://localhost/HandBrake/trunk@3726 b64f7644-9d1e-0410-96f1-a4d463321fa5

win/C#/HandBrake.ApplicationServices/Model/Job.cs
win/C#/frmMain.cs

index 07f84b4..a18a611 100644 (file)
@@ -10,6 +10,9 @@ namespace HandBrake.ApplicationServices.Model
     /// </summary>\r
     public class Job\r
     {\r
+        /// <summary>\r
+        /// the CLI Query.\r
+        /// </summary>\r
         private string query;\r
 \r
         /// <summary>\r
index 4d34173..1f2e15b 100644 (file)
@@ -83,6 +83,19 @@ namespace Handbrake
                     return Path.GetFileName(selectedTitle.SourceName);\r
                 }\r
 \r
+                // We have a drive, selected as a folder.\r
+                if (this.sourcePath.EndsWith("\\"))\r
+                {\r
+                    drives = Main.GetDrives();\r
+                    foreach (DriveInformation item in drives)\r
+                    {\r
+                        if (item.RootDirectory.Contains(this.sourcePath))\r
+                        {\r
+                            return item.VolumeLabel;\r
+                        }\r
+                    }\r
+                }\r
+\r
                 if (Path.GetFileNameWithoutExtension(this.sourcePath) != "VIDEO_TS")\r
                     return Path.GetFileNameWithoutExtension(this.sourcePath);\r
 \r