forked from Speiger/Mario-Kart-World-Tracking-Tool
Fixed caches weren't being used
This commit is contained in:
1 parent
091be87789
commit
c0098fa92b
2 files changed
+6
-4
No files matched your search
@@ -169,8 +169,10 @@ public class Registry {
|
||||
if(Files.exists(path)) {
|
||||
synchronized(syncObj) {
|
||||
try(FileSystem system = FileSystems.newFileSystem(path)) {
|
||||
Path resolve = system.getPath(image.fileId().toString().replace("-", "_"));
|
||||
if(Files.exists(resolve)) { return ImageIO.read(new ByteArrayInputStream(Files.readAllBytes(resolve))); }
|
||||
Path resolve = system.getPath(image.fileId().toString().replace("-", "_")+".jpg");
|
||||
if(Files.exists(resolve)) {
|
||||
return ImageIO.read(new ByteArrayInputStream(Files.readAllBytes(resolve)));
|
||||
}
|
||||
}
|
||||
catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
|
||||
Reference in new issue
Block a user