Skip to content

Commit 5ed5484

Browse files
committed
fix bug
1 parent ff5a8f4 commit 5ed5484

File tree

2 files changed

+21
-8
lines changed

2 files changed

+21
-8
lines changed

Source/WPF/MyMoney/StockQuotes/IStockQuoteService.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System;
2+
using System.Collections;
23
using System.Collections.Generic;
34
using System.ComponentModel;
45
using System.Diagnostics;
@@ -458,6 +459,11 @@ internal IEnumerable<DateRange> GetMissingDataRanges(int yearsToCheck)
458459
{
459460
var next = ranges[i - 1];
460461
var current = ranges[i];
462+
463+
if (current.Start.Year == 2025 && current.Start.Month == 1 && current.Start.Day == 8 && this.Symbol == "MSFT")
464+
{
465+
Debug.WriteLine("???");
466+
}
461467
var span = next.End - current.Start;
462468
if (span.TotalDays < 7)
463469
{

Source/WPF/MyMoney/Utilities/TempFileCollection.cs

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -139,19 +139,26 @@ private void LoadTempFileList()
139139
string fname = TempFileList;
140140
if (File.Exists(fname))
141141
{
142-
XDocument doc = XDocument.Load(fname);
143-
foreach (XElement file in doc.Root.Elements("File"))
142+
try
144143
{
145-
string name = (string)file.Attribute("Name");
146-
if (!string.IsNullOrEmpty(name) && File.Exists(name))
144+
XDocument doc = XDocument.Load(fname);
145+
foreach (XElement file in doc.Root.Elements("File"))
147146
{
148-
Instance.files.Add(name);
147+
string name = (string)file.Attribute("Name");
148+
if (!string.IsNullOrEmpty(name) && File.Exists(name))
149+
{
150+
Instance.files.Add(name);
151+
}
149152
}
150153
}
151-
}
154+
catch (Exception)
155+
{
156+
// ignore errors
157+
}
152158

153-
// now try and delete them!
154-
Cleanup();
159+
// now try and delete them!
160+
Cleanup();
161+
}
155162
}
156163
}
157164
}

0 commit comments

Comments
 (0)