mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-05-02 11:34:08 +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();
|
RefreshTimer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void TryClearNow(){
|
||||||
|
try{
|
||||||
|
Directory.Delete(CacheFolder, true);
|
||||||
|
}catch{
|
||||||
|
// welp, too bad
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static void Exit(){
|
public static void Exit(){
|
||||||
if (AutoClearTimer != null){
|
if (AutoClearTimer != null){
|
||||||
AutoClearTimer.Dispose();
|
AutoClearTimer.Dispose();
|
||||||
@ -61,11 +69,7 @@ public static void Exit(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ClearOnExit){
|
if (ClearOnExit){
|
||||||
try{
|
TryClearNow();
|
||||||
Directory.Delete(CacheFolder, true);
|
|
||||||
}catch{
|
|
||||||
// welp, too bad
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -126,6 +126,7 @@ private static void Main(){
|
|||||||
|
|
||||||
if (Arguments.HasFlag(Arguments.ArgUpdated)){
|
if (Arguments.HasFlag(Arguments.ArgUpdated)){
|
||||||
WindowsUtils.TryDeleteFolderWhenAble(InstallerPath, 8000);
|
WindowsUtils.TryDeleteFolderWhenAble(InstallerPath, 8000);
|
||||||
|
BrowserCache.TryClearNow();
|
||||||
}
|
}
|
||||||
|
|
||||||
BrowserCache.RefreshTimer();
|
BrowserCache.RefreshTimer();
|
||||||
|
Loading…
Reference in New Issue
Block a user