From e2db0d35edc9d9974f9fa4918f1a64921a5a4aef Mon Sep 17 00:00:00 2001 From: alexytomi <60690056+alexytomi@users.noreply.github.com> Date: Sat, 21 Jun 2025 18:14:49 +0800 Subject: [PATCH] fix[version_list]: Move file to cache This allows people to forcibly reset it to see newer version faster by clearing the cache. Plus if you don't have internet, having this isn't even important. --- .../main/java/net/kdt/pojavlaunch/tasks/AsyncVersionList.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/tasks/AsyncVersionList.java b/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/tasks/AsyncVersionList.java index 0a18ac0fb..3238a4ffd 100644 --- a/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/tasks/AsyncVersionList.java +++ b/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/tasks/AsyncVersionList.java @@ -26,7 +26,7 @@ public class AsyncVersionList { public void getVersionList(@Nullable VersionDoneListener listener, boolean secondPass){ sExecutorService.execute(() -> { - File versionFile = new File(Tools.DIR_DATA + "/version_list.json"); + File versionFile = new File(Tools.DIR_CACHE + "/version_list.json"); JMinecraftVersionList versionList = null; try{ if(!versionFile.exists() || (System.currentTimeMillis() > versionFile.lastModified() + 86400000 )){ @@ -68,7 +68,7 @@ public class AsyncVersionList { // Then save the version list //TODO make it not save at times ? - FileOutputStream fos = new FileOutputStream(Tools.DIR_DATA + "/version_list.json"); + FileOutputStream fos = new FileOutputStream(Tools.DIR_CACHE + "/version_list.json"); fos.write(jsonString.getBytes()); fos.close();