diff options
author | sr55 <[email protected]> | 2012-10-16 18:05:54 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2012-10-16 18:05:54 +0000 |
commit | 3d364a3d03acdcc43daa33dbe494a41a36ddd585 (patch) | |
tree | f30c3abbc9741293480d01f8833e146834bf3c7c /win/CS | |
parent | 029c9b1db2fbf86fc8ded15580cd8023e4b180fc (diff) |
WinGui: Fixes to the new queue recovery code. Cleanup of old recovery files should now work.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5017 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS')
-rw-r--r-- | win/CS/HandBrakeWPF/Helpers/QueueRecoveryHelper.cs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/win/CS/HandBrakeWPF/Helpers/QueueRecoveryHelper.cs b/win/CS/HandBrakeWPF/Helpers/QueueRecoveryHelper.cs index b434fc0b9..25e77bfa2 100644 --- a/win/CS/HandBrakeWPF/Helpers/QueueRecoveryHelper.cs +++ b/win/CS/HandBrakeWPF/Helpers/QueueRecoveryHelper.cs @@ -11,7 +11,6 @@ namespace HandBrakeWPF.Helpers {
using System;
using System.Collections.Generic;
- using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
@@ -131,9 +130,9 @@ namespace HandBrakeWPF.Helpers try
{
// Once we load it in, remove it as we no longer need it.
- File.Delete(file);
+ File.Delete(Path.Combine(appDataPath, file));
}
- catch (Exception)
+ catch (Exception exc)
{
// Keep quite, nothing much we can do if there are problems.
// We will continue processing files.
@@ -148,7 +147,7 @@ namespace HandBrakeWPF.Helpers if (File.Exists(Path.Combine(appDataPath, file)))
{
// Check that the file doesn't belong to another running instance.
- Match m = Regex.Match(file, @"[([0-9]+)].xml");
+ Match m = Regex.Match(file, @"([0-9]+).xml");
if (m.Success)
{
int processId = int.Parse(m.Groups[1].ToString());
|