summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Helpers/QueueRecoveryHelper.cs
diff options
context:
space:
mode:
Diffstat (limited to 'win/CS/HandBrakeWPF/Helpers/QueueRecoveryHelper.cs')
-rw-r--r--win/CS/HandBrakeWPF/Helpers/QueueRecoveryHelper.cs11
1 files changed, 8 insertions, 3 deletions
diff --git a/win/CS/HandBrakeWPF/Helpers/QueueRecoveryHelper.cs b/win/CS/HandBrakeWPF/Helpers/QueueRecoveryHelper.cs
index 04274e791..1cbc352f3 100644
--- a/win/CS/HandBrakeWPF/Helpers/QueueRecoveryHelper.cs
+++ b/win/CS/HandBrakeWPF/Helpers/QueueRecoveryHelper.cs
@@ -45,13 +45,18 @@ namespace HandBrakeWPF.Helpers
{
try
{
- XmlSerializer Ser = new XmlSerializer(typeof(List<QueueTask>));
string tempPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), @"HandBrake\");
List<string> queueFiles = new List<string>();
- List<string> removeFiles = new List<string>();
-
DirectoryInfo info = new DirectoryInfo(tempPath);
IEnumerable<FileInfo> logFiles = info.GetFiles("*.xml").Where(f => f.Name.StartsWith("hb_queue_recovery"));
+
+ if (!logFiles.Any())
+ {
+ return queueFiles;
+ }
+
+ List<string> removeFiles = new List<string>();
+ XmlSerializer Ser = new XmlSerializer(typeof(List<QueueTask>));
foreach (FileInfo file in logFiles)
{
try