Skip to content

Commit

Permalink
FOS can now run on Linux
Browse files Browse the repository at this point in the history
Tested on Ubuntu. Thanks @Durmiendo for letting me know!
  • Loading branch information
Slotterleet committed May 24, 2024
1 parent eb7d263 commit 54ded55
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/fos/files/InternalFileTree.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package fos.files;

import arc.files.*;
import arc.util.OS;

/**
* Use for JAR internal navigation
Expand All @@ -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));
}
Expand Down

0 comments on commit 54ded55

Please sign in to comment.