diff options
author | sr55 <[email protected]> | 2012-06-07 23:23:24 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2012-06-07 23:23:24 +0000 |
commit | d5acd6652ff668e7a391809088cc8fbc698919bb (patch) | |
tree | 6215f831ad25cea6e2870ff3c00897145d4f8ae4 /win/CS | |
parent | 42f3324742a8aa77e65202e8549f5239e3d12d3a (diff) |
Wingui: Fix an issue where a trailing slash can cause an encode not to start.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4718 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS')
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs b/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs index e22b4ec1b..a5df48e2a 100644 --- a/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs +++ b/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs @@ -10,6 +10,7 @@ namespace HandBrake.ApplicationServices.Utilities using System.Collections.ObjectModel;
using System.Globalization;
using System.IO;
+ using System.Text.RegularExpressions;
using HandBrake.ApplicationServices.Functions;
using HandBrake.ApplicationServices.Model;
@@ -140,6 +141,13 @@ namespace HandBrake.ApplicationServices.Utilities {
string query = string.Empty;
+ // If we have a folder, strip it's trailing slash for the CLI.
+ // It behaves a bit funny with trailing \ in some cases.
+ if (task.Source.EndsWith("\\"))
+ {
+ task.Source = task.Source.TrimEnd('\\');
+ }
+
query += string.Format(" -i \"{0}\"", task.Source);
query += string.Format(" -t {0}", task.Title);
query += string.Format(" --angle {0}", task.Angle);
|