mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
Update ImageFileCache.cs
This commit is contained in:
parent
6a4a784f32
commit
1cb6ef7df9
|
|
@ -79,23 +79,9 @@ namespace MapControl.Caching
|
|||
try
|
||||
{
|
||||
deletedFileCount += directory.EnumerateDirectories().Sum(dir => CleanDirectory(dir));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine("ImageFileCache: Failed enumerating directories in {0}: {1}", directory.FullName, ex.Message);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
deletedFileCount += directory.EnumerateFiles().Sum(file => CleanFile(file));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine("ImageFileCache: Failed enumerating files in {0}: {1}", directory.FullName, ex.Message);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
if (!directory.EnumerateFileSystemInfos().Any())
|
||||
{
|
||||
directory.Delete();
|
||||
|
|
|
|||
Loading…
Reference in a new issue