summaryrefslogtreecommitdiffstats
path: root/win/CS
diff options
context:
space:
mode:
authorsr55 <[email protected]>2015-04-18 15:43:57 +0000
committersr55 <[email protected]>2015-04-18 15:43:57 +0000
commit0ef15ccef9d0c44ab5102cf486bb420eda82a7f2 (patch)
treeb4ca36ff96f4ba3b2ea8c22969a5cca8013c9bc7 /win/CS
parent6ba51b19f630f10180bda723638d2689061945f1 (diff)
WinGui: Small bug fix to handling of queue recovery when running mulitple instances. The GUI should not load the other app instances queue.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7098 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS')
-rw-r--r--win/CS/HandBrakeWPF/Helpers/QueueRecoveryHelper.cs16
1 files changed, 15 insertions, 1 deletions
diff --git a/win/CS/HandBrakeWPF/Helpers/QueueRecoveryHelper.cs b/win/CS/HandBrakeWPF/Helpers/QueueRecoveryHelper.cs
index d2d9f1322..57033ae9d 100644
--- a/win/CS/HandBrakeWPF/Helpers/QueueRecoveryHelper.cs
+++ b/win/CS/HandBrakeWPF/Helpers/QueueRecoveryHelper.cs
@@ -126,7 +126,21 @@ namespace HandBrakeWPF.Helpers
{
foreach (string file in queueFiles)
{
- encodeQueue.RestoreQueue(appDataPath + file); // Start Recovery
+ // Skip over the file if it belongs to another HandBrake instance.
+ Match m = Regex.Match(file, @"([0-9]+).xml");
+ if (m.Success)
+ {
+ int processId = int.Parse(m.Groups[1].ToString());
+ if (processId != GeneralUtilities.ProcessId && GeneralUtilities.IsPidACurrentHandBrakeInstance(processId))
+ {
+ continue;
+ }
+ }
+
+ // Recover the Queue
+ encodeQueue.RestoreQueue(appDataPath + file);
+
+ // Cleanup
if (!file.Contains(GeneralUtilities.ProcessId.ToString(CultureInfo.InvariantCulture)))
{
try