diff options
author | sr55 <[email protected]> | 2010-12-31 17:08:18 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2010-12-31 17:08:18 +0000 |
commit | de17702605859fec7e90edd468ee690bfca109ac (patch) | |
tree | d25b7885ae7f6555dba7b68f2c2d75f2ae8b912a /win/C#/HandBrake.ApplicationServices/Services | |
parent | bc0244fcb69ad71deef64ced278637df994f168e (diff) |
WinGui:
- Quick fix for the folder source selection when selecting a drive letter. It appears escape chars were getting sent to the CLI when they shouldn't have been. I'll tidy this up later.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3721 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/HandBrake.ApplicationServices/Services')
-rw-r--r-- | win/C#/HandBrake.ApplicationServices/Services/Scan.cs | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/win/C#/HandBrake.ApplicationServices/Services/Scan.cs b/win/C#/HandBrake.ApplicationServices/Services/Scan.cs index e2412cbd3..2a5188ab6 100644 --- a/win/C#/HandBrake.ApplicationServices/Services/Scan.cs +++ b/win/C#/HandBrake.ApplicationServices/Services/Scan.cs @@ -184,14 +184,22 @@ namespace HandBrake.ApplicationServices.Services if (title > 0)
extraArguments += " --scan ";
+ // Quick fix for "F:\\" style paths. Just get rid of the \\ so the CLI doesn't fall over.
+ // Sould probably clean up the escaping of the strings later.
+ if (sourcePath.ToString().EndsWith("\\"))
+ {
+ sourcePath = sourcePath.ToString().Replace("\\", string.Empty);
+ }
+
+ string source = "\"" + sourcePath + "\"";
+ string command = String.Format(@" -i {0} -t{1} {2} -v ", source, title, extraArguments);
+
this.hbProc = new Process
{
StartInfo =
{
FileName = handbrakeCLIPath,
- Arguments =
- String.Format(@" -i ""{0}"" -t{1} {2} -v ", sourcePath, title,
- extraArguments),
+ Arguments = command,
RedirectStandardOutput = true,
RedirectStandardError = true,
UseShellExecute = false,
@@ -213,7 +221,10 @@ namespace HandBrake.ApplicationServices.Services if (this.readData.Buffer.Length < 100000000)
{
scanLog.WriteLine(Logging.CreateCliLogHeader(null));
+ scanLog.WriteLine("Query: " + command);
scanLog.Write(this.readData.Buffer);
+
+ logBuffer.AppendLine("Query: " + command);
logBuffer.AppendLine(this.readData.Buffer.ToString());
}
else
|