summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs
diff options
context:
space:
mode:
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs8
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);