diff options
author | sr55 <[email protected]> | 2018-06-15 20:00:31 +0100 |
---|---|---|
committer | sr55 <[email protected]> | 2018-06-15 20:00:31 +0100 |
commit | 762b1cf321b7db4b7f58b36c88baa7714edabfc3 (patch) | |
tree | 938c7b91ea94d3c239df877828408d7604a84a75 /win | |
parent | a883f4611db52230835b388dda1d20b38a999daf (diff) |
WinGui: Fix a bug in queue recovery where old files were not deleted.
Diffstat (limited to 'win')
-rw-r--r-- | win/CS/HandBrakeWPF/Helpers/QueueRecoveryHelper.cs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/win/CS/HandBrakeWPF/Helpers/QueueRecoveryHelper.cs b/win/CS/HandBrakeWPF/Helpers/QueueRecoveryHelper.cs index 657062fc0..cb17e2e41 100644 --- a/win/CS/HandBrakeWPF/Helpers/QueueRecoveryHelper.cs +++ b/win/CS/HandBrakeWPF/Helpers/QueueRecoveryHelper.cs @@ -36,6 +36,9 @@ namespace HandBrakeWPF.Helpers /// If it does, it means the last queue did not complete before HandBrake closed.
/// So, return a boolean if true.
/// </summary>
+ /// <param name="filterQueueFiles">
+ /// The filter Queue Files.
+ /// </param>
/// <returns>
/// True if there is a queue to recover.
/// </returns>
@@ -156,7 +159,7 @@ namespace HandBrakeWPF.Helpers isRecovered = true;
// Cleanup
- CleanupFiles(new List<string> { Path.Combine(appDataPath, file) });
+ CleanupFiles(new List<string> { file });
}
return isRecovered;
@@ -199,6 +202,8 @@ namespace HandBrakeWPF.Helpers private static void CleanupFiles(List<string> removeFiles)
{
+ string appDataPath = DirectoryUtilities.GetUserStoragePath(VersionHelper.IsNightly());
+
// Cleanup old/unused queue files for now.
foreach (string file in removeFiles)
{
@@ -212,7 +217,8 @@ namespace HandBrakeWPF.Helpers }
}
- File.Delete(file);
+ string fullPath = Path.Combine(appDataPath, file);
+ File.Delete(fullPath);
}
}
}
|