From 54ded55948a3176f187f8d2ff605e3e7b3332c7e Mon Sep 17 00:00:00 2001 From: Slotterleet <62336673+Slotterleet@users.noreply.github.com> Date: Fri, 24 May 2024 21:00:53 +0300 Subject: [PATCH] FOS can now run on Linux Tested on Ubuntu. Thanks @Durmiendo for letting me know! --- src/fos/files/InternalFileTree.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/fos/files/InternalFileTree.java b/src/fos/files/InternalFileTree.java index e38ec3b3..8af08908 100644 --- a/src/fos/files/InternalFileTree.java +++ b/src/fos/files/InternalFileTree.java @@ -1,6 +1,7 @@ package fos.files; import arc.files.*; +import arc.util.OS; /** * Use for JAR internal navigation @@ -19,7 +20,7 @@ public InternalFileTree(Class owner) { String classPath = owner.getResource("").getFile().replaceAll("%20", " "); classPath = classPath.substring(classPath.indexOf(":")+2); - String jarPath = classPath.substring(0, classPath.indexOf("!")); + String jarPath = (OS.isLinux ? "/" : "") + classPath.substring(0, classPath.indexOf("!")); root = new ZipFi(new Fi(jarPath)); }