diff options
| author | ilotterytea <iltsu@alright.party> | 2022-10-21 00:03:39 +0600 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2022-10-21 00:03:39 +0600 |
| commit | 9fc8a0f09ad531520db8896e671d10393e7d2d39 (patch) | |
| tree | 21814f87e09264bb27789b0b5dc6f763ce1f70d4 | |
| parent | d80cbc6e2f9d8914ffd576c5963f78d7d354d408 (diff) | |
я не ебу почему для андроидов new File() вместо Gdx.files.external()
| -rw-r--r-- | core/src/com/ilotterytea/maxoning/utils/serialization/GameDataSystem.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/src/com/ilotterytea/maxoning/utils/serialization/GameDataSystem.java b/core/src/com/ilotterytea/maxoning/utils/serialization/GameDataSystem.java index eff6c75..157b0a5 100644 --- a/core/src/com/ilotterytea/maxoning/utils/serialization/GameDataSystem.java +++ b/core/src/com/ilotterytea/maxoning/utils/serialization/GameDataSystem.java @@ -96,16 +96,16 @@ public class GameDataSystem { } } - if ((OsUtils.isAndroid || OsUtils.isIos) && Gdx.files.local(Gdx.files.getExternalStoragePath() + "/" + file_name).exists()) { + if ((OsUtils.isAndroid || OsUtils.isIos) && new File(Gdx.files.getExternalStoragePath() + file_name).exists()) { try { - log.info(String.format("Trying to get the savegame at %s/%s...", Gdx.files.getExternalStoragePath(), file_name)); - FileInputStream fis = new FileInputStream(String.format("%s/%s", Gdx.files.getExternalStoragePath(), file_name)); + log.info(String.format("Trying to get the savegame at %s%s...", Gdx.files.getExternalStoragePath(), file_name)); + FileInputStream fis = new FileInputStream(String.format("%s%s", Gdx.files.getExternalStoragePath(), file_name)); ObjectInputStream oos = new ObjectInputStream(fis); sav = gson.fromJson(oos.readUTF(), MaxonSavegame.class); oos.close(); - log.info(String.format("Successfully loaded the savegame from %s/%s!", dir.getAbsolutePath(), file_name)); + log.info(String.format("Successfully loaded the savegame from %s%s!", Gdx.files.getExternalStoragePath(), file_name)); } catch (IOException e) { throw new RuntimeException(e); } |
