summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs
diff options
context:
space:
mode:
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Services/LibScan.cs')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Services/LibScan.cs14
1 files changed, 11 insertions, 3 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs b/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs
index 1dab6aa6c..033f16018 100644
--- a/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs
+++ b/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs
@@ -50,6 +50,11 @@ namespace HandBrake.ApplicationServices.Services
/// </summary>
private readonly StringBuilder logging;
+ /// <summary>
+ /// The Current source scan path.
+ /// </summary>
+ private string currentSourceScanPath;
+
#endregion
/// <summary>
@@ -168,14 +173,17 @@ namespace HandBrake.ApplicationServices.Services
{
this.logging.Clear();
+ string source = sourcePath.ToString().EndsWith("\\") ? sourcePath.ToString() : "\"" + sourcePath + "\"";
+ currentSourceScanPath = source;
+
IsScanning = true;
if (this.ScanStared != null)
this.ScanStared(this, new EventArgs());
if (title != 0)
- instance.StartScan(sourcePath.ToString(), previewCount, title);
+ instance.StartScan(source, previewCount, title);
else
- instance.StartScan(sourcePath.ToString(), previewCount);
+ instance.StartScan(source, previewCount);
}
catch (Exception exc)
{
@@ -200,7 +208,7 @@ namespace HandBrake.ApplicationServices.Services
/// </param>
private void InstanceScanCompleted(object sender, EventArgs e)
{
- this.SouceData = new Source { Titles = ConvertTitles(this.instance.Titles) };
+ this.SouceData = new Source { Titles = ConvertTitles(this.instance.Titles), ScanPath = currentSourceScanPath};
IsScanning = false;