OSDN Git Service

WinGui:
authorsr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Mon, 24 May 2010 17:57:27 +0000 (17:57 +0000)
committersr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Mon, 24 May 2010 17:57:27 +0000 (17:57 +0000)
- Check Destination Path exists before adding to queue.

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

win/C#/frmMain.cs

index 958e179..94b7400 100644 (file)
@@ -1130,10 +1130,15 @@ namespace Handbrake
         private void btn_add2Queue_Click(object sender, EventArgs e)\r
         {\r
             if (string.IsNullOrEmpty(sourcePath) || string.IsNullOrEmpty(text_destination.Text))\r
-                MessageBox.Show("No source or destination selected.", "Warning", MessageBoxButtons.OK,\r
-                                MessageBoxIcon.Warning);\r
+                MessageBox.Show("No source or destination selected.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);\r
             else\r
             {\r
+                if (!Directory.Exists(text_destination.Text))\r
+                {\r
+                    MessageBox.Show("Destination Path does not exist.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);\r
+                    return;\r
+                }\r
+\r
                 string query = QueryGenerator.GenerateCliQuery(this, drop_mode.SelectedIndex, 0, null);\r
                 if (rtf_query.Text != string.Empty)\r
                     query = rtf_query.Text;\r