Fixed caches weren't being used

This commit is contained in:
2025-08-04 10:00:10 +02:00
parent 091be87789
commit c0098fa92b
2 changed files with 6 additions and 4 deletions
+4 -2
View File
@@ -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();