Fixed caches weren't being used
This commit is contained in:
@@ -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