diff options
author | sr55 <[email protected]> | 2011-01-03 20:15:10 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2011-01-03 20:15:10 +0000 |
commit | ee94883ba1b2e3d0dc432c84a2c05db5812fe1c6 (patch) | |
tree | a279256432b524c06048a8b7e4aa6b90e913c3c0 /win/C#/HandBrake.ApplicationServices/Services/Scan.cs | |
parent | b1ab0c5b00eef003cb737414e77e4f12ad25b854 (diff) |
WinGui:
- Second attempt at fixing file path problems.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3736 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/HandBrake.ApplicationServices/Services/Scan.cs')
-rw-r--r-- | win/C#/HandBrake.ApplicationServices/Services/Scan.cs | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/win/C#/HandBrake.ApplicationServices/Services/Scan.cs b/win/C#/HandBrake.ApplicationServices/Services/Scan.cs index 2a5188ab6..7bc74bc5c 100644 --- a/win/C#/HandBrake.ApplicationServices/Services/Scan.cs +++ b/win/C#/HandBrake.ApplicationServices/Services/Scan.cs @@ -110,7 +110,7 @@ namespace HandBrake.ApplicationServices.Services if (logBuffer == null)
{
ResetLogReader(false);
- ReadLastScanFile();
+ ReadLastScanFile();
}
return logBuffer != null ? logBuffer.ToString() : string.Empty;
@@ -146,7 +146,7 @@ namespace HandBrake.ApplicationServices.Services catch (Exception ex)
{
errorService.ShowError("Unable to kill HandBrakeCLI.exe \n" +
- "You may need to manually kill HandBrakeCLI.exe using the Windows Task Manager if it does not close automatically" +
+ "You may need to manually kill HandBrakeCLI.exe using the Windows Task Manager if it does not close automatically" +
" within the next few minutes. ", ex.ToString());
}
}
@@ -186,12 +186,16 @@ namespace HandBrake.ApplicationServices.Services // 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.
+ string source;
if (sourcePath.ToString().EndsWith("\\"))
{
- sourcePath = sourcePath.ToString().Replace("\\", string.Empty);
+ source = sourcePath.ToString();
+ }
+ else
+ {
+ source = "\"" + sourcePath + "\"";
}
- string source = "\"" + sourcePath + "\"";
string command = String.Format(@" -i {0} -t{1} {2} -v ", source, title, extraArguments);
this.hbProc = new Process
@@ -237,7 +241,7 @@ namespace HandBrake.ApplicationServices.Services IsScanning = false;
if (this.ScanCompleted != null)
- this.ScanCompleted(this, new EventArgs());
+ this.ScanCompleted(this, new EventArgs());
}
catch (Exception exc)
{
@@ -246,7 +250,7 @@ namespace HandBrake.ApplicationServices.Services errorService.ShowError("An error has occured during the scan process.", exc.ToString());
if (this.ScanCompleted != null)
- this.ScanCompleted(this, new EventArgs());
+ this.ScanCompleted(this, new EventArgs());
}
}
|