Skip to content
This repository has been archived by the owner on Jan 3, 2020. It is now read-only.

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
RecursiveG committed Nov 18, 2014
1 parent 8e2768c commit 4cbcc6f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/main/java/org/devinprogress/uniskinmod/SkinCore.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import com.mojang.authlib.GameProfile;
import com.mojang.authlib.minecraft.MinecraftProfileTexture;
import cpw.mods.fml.relauncher.IFMLLoadingPlugin;
import org.apache.commons.io.FileUtils;
import org.apache.logging.log4j.LogManager;

/**
Expand Down Expand Up @@ -86,9 +87,12 @@ public void injectData(Map<String, Object> data) {
File skin_dir=new File(((File) data.get("mcLocation")).getAbsolutePath()
+ File.separatorChar + "assets" + File.separatorChar
+ "skins");
if(skin_dir.exists()&&skin_dir.isDirectory()){
skin_dir.delete();
try {
FileUtils.deleteDirectory(skin_dir);
LogManager.getLogger("UniSkinMod").info("Skin cache cleaned.");
} catch (IOException e) {
LogManager.getLogger("UniSkinMod").warn("Failed to clean cache.");
e.printStackTrace();
}
}
}
Expand Down

0 comments on commit 4cbcc6f

Please sign in to comment.