Skip to content

Commit

Permalink
attempt to purge temp cache completely when no cached expanded folder…
Browse files Browse the repository at this point in the history
…s in memory
  • Loading branch information
xavierdecoster committed Oct 14, 2015
1 parent ede4eb6 commit 88a5cdc
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/Core/Packages/OptimizedZipPackage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -318,18 +318,16 @@ public static void PurgeCache()
{
foreach (var valueTuple in _cachedExpandedFolder.Values)
{
try
{
string expandedFolder = valueTuple.Item1;
_tempFileSystem.DeleteDirectory(expandedFolder, recursive: true);
}
catch (Exception)
{
}
string expandedFolder = valueTuple.Item1;
_tempFileSystem.DeleteDirectorySafe(expandedFolder, recursive: true);
}

_cachedExpandedFolder.Clear();
}
else
{
_tempFileSystem.DeleteDirectorySafe(_tempFileSystem.Root, recursive: true);
}
}
}
}
Expand Down

0 comments on commit 88a5cdc

Please sign in to comment.