mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-04-23 21:15:49 +02:00
Clear cache after each update
This commit is contained in:
parent
1b5304efb7
commit
6f414d312c
@ -54,6 +54,14 @@ public static void SetClearOnExit(){
|
||||
RefreshTimer();
|
||||
}
|
||||
|
||||
public static void TryClearNow(){
|
||||
try{
|
||||
Directory.Delete(CacheFolder, true);
|
||||
}catch{
|
||||
// welp, too bad
|
||||
}
|
||||
}
|
||||
|
||||
public static void Exit(){
|
||||
if (AutoClearTimer != null){
|
||||
AutoClearTimer.Dispose();
|
||||
@ -61,11 +69,7 @@ public static void Exit(){
|
||||
}
|
||||
|
||||
if (ClearOnExit){
|
||||
try{
|
||||
Directory.Delete(CacheFolder, true);
|
||||
}catch{
|
||||
// welp, too bad
|
||||
}
|
||||
TryClearNow();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -126,6 +126,7 @@ private static void Main(){
|
||||
|
||||
if (Arguments.HasFlag(Arguments.ArgUpdated)){
|
||||
WindowsUtils.TryDeleteFolderWhenAble(InstallerPath, 8000);
|
||||
BrowserCache.TryClearNow();
|
||||
}
|
||||
|
||||
BrowserCache.RefreshTimer();
|
||||
|
Loading…
Reference in New Issue
Block a user