Skip to content

Commit

Permalink
fix for Cache-clearing.
Browse files Browse the repository at this point in the history
  • Loading branch information
cadon committed Apr 10, 2016
1 parent f480623 commit 46836dd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions ARKBreedingStats/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1691,11 +1691,14 @@ private void Form1_FormClosed(object sender, FormClosedEventArgs e)
Properties.Settings.Default.Save();

// remove old cache-files
var directory = new System.IO.DirectoryInfo("img/cache");
var oldCacheFiles = directory.GetFiles().Where(f => f.LastAccessTime < DateTime.Now.AddDays(-5)).ToList();
foreach (FileInfo f in oldCacheFiles)
if (Directory.Exists("img/cache"))
{
f.Delete();
var directory = new System.IO.DirectoryInfo("img/cache");
var oldCacheFiles = directory.GetFiles().Where(f => f.LastAccessTime < DateTime.Now.AddDays(-5)).ToList();
foreach (FileInfo f in oldCacheFiles)
{
f.Delete();
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion ARKBreedingStats/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@
// übernehmen, indem Sie "*" eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("0.18.3.0")]
[assembly: AssemblyFileVersion("0.18.4.0")]

0 comments on commit 46836dd

Please sign in to comment.