From 46836ddc9e736f19325c7d240bc20068ea7b0afb Mon Sep 17 00:00:00 2001 From: cadon Date: Sun, 10 Apr 2016 21:54:00 +0200 Subject: [PATCH] fix for Cache-clearing. --- ARKBreedingStats/Form1.cs | 11 +++++++---- ARKBreedingStats/Properties/AssemblyInfo.cs | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/ARKBreedingStats/Form1.cs b/ARKBreedingStats/Form1.cs index b8978e5b..700f9086 100644 --- a/ARKBreedingStats/Form1.cs +++ b/ARKBreedingStats/Form1.cs @@ -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(); + } } } diff --git a/ARKBreedingStats/Properties/AssemblyInfo.cs b/ARKBreedingStats/Properties/AssemblyInfo.cs index 551d8d4b..4becebf3 100644 --- a/ARKBreedingStats/Properties/AssemblyInfo.cs +++ b/ARKBreedingStats/Properties/AssemblyInfo.cs @@ -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")]