summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF
diff options
context:
space:
mode:
authorsr55 <[email protected]>2016-04-19 19:56:14 +0100
committersr55 <[email protected]>2016-04-19 19:56:14 +0100
commit5e299e96599e191345f303623baa6ceda01c0916 (patch)
tree9f22311f79c4c591bf454ebc63d013b7b64c2694 /win/CS/HandBrakeWPF
parentc892e3697bc617bcb3ffdc67f2e6e56a341c9691 (diff)
parentabce2df0a9c264e17fa262ed1b5f0494a2f60d08 (diff)
Merge branch 'Idea2'
Diffstat (limited to 'win/CS/HandBrakeWPF')
-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