mirror of
https://github.com/xfl03/MCCustomSkinLoader.git
synced 2026-11-18 23:09:15 +00:00
Do more for cache
This commit is contained in:
1 parent
bdead01ef9
commit
7e522011e7
5 files changed
+17
-18
No files matched your search
@@ -35,9 +35,11 @@ public class HttpTextureUtil {
|
||||
}
|
||||
if(fakeUrl.startsWith(LOCAL_LEGACY_MARK)){
|
||||
fakeUrl=fakeUrl.replaceFirst(LOCAL_LEGACY_MARK, "");
|
||||
info.url=fakeUrl;
|
||||
info.hash=DigestUtils.sha1Hex(info.url);;
|
||||
info.cacheFile=HttpTextureUtil.getCacheFile(info.hash);
|
||||
String[] t=fakeUrl.split(",",2);
|
||||
if(t.length!=2)
|
||||
return info;
|
||||
info.cacheFile=new File(CustomSkinLoader.DATA_DIR,t[1]);
|
||||
info.hash=t[0];
|
||||
return info;
|
||||
}
|
||||
if(fakeUrl.startsWith(LOCAL_MARK)){
|
||||
@@ -48,12 +50,9 @@ public class HttpTextureUtil {
|
||||
}
|
||||
if(fakeUrl.startsWith(LEGACY_MARK)){
|
||||
fakeUrl=fakeUrl.replaceFirst(LEGACY_MARK, "");
|
||||
String[] t=fakeUrl.split(",",2);
|
||||
if(t.length!=2)
|
||||
return info;
|
||||
info.url=t[1];
|
||||
info.hash=t[0];
|
||||
info.cacheFile=getCacheFile(info.hash);
|
||||
info.url=fakeUrl;
|
||||
info.hash=DigestUtils.sha1Hex(info.url);;
|
||||
info.cacheFile=HttpTextureUtil.getCacheFile(info.hash);
|
||||
return info;
|
||||
}
|
||||
return info;
|
||||
|
||||
Reference in new issue
Block a user