mirror of
https://github.com/xfl03/MCCustomSkinLoader.git
synced 2026-11-21 06:52:17 +00:00
Fix auto cache clean
This commit is contained in:
1 parent
e487ab1147
commit
faff465ace
1 file changed
+7
-2
@@ -56,8 +56,13 @@ public class Config {
|
||||
if(config.ignoreHttpsCertificate)
|
||||
HttpUtil0.ignoreHttpsCertificate();
|
||||
if(config.enableCacheAutoClean && !config.enableLocalProfileCache){
|
||||
HttpRequestUtil.CACHE_DIR.delete();
|
||||
HttpTextureUtil.cleanCacheDir();
|
||||
try{
|
||||
FileUtils.deleteDirectory(HttpRequestUtil.CACHE_DIR);
|
||||
FileUtils.deleteDirectory(HttpTextureUtil.getCacheDir());
|
||||
CustomSkinLoader.logger.info("Successfully cleaned cache.");
|
||||
}catch(Exception e){
|
||||
CustomSkinLoader.logger.warning("Exception occurs while cleaning cache: "+e.toString());
|
||||
}
|
||||
}
|
||||
|
||||
//Output config
|
||||
|
||||
Reference in new issue
Block a user