SkyblockClient / SkyClient-Universal

The Java (Universal) installer for SkyClient
GNU General Public License v3.0
30 stars 19 forks source link

FileNotFoundException on Linux #18

Closed TheCherry closed 1 year ago

TheCherry commented 2 years ago

On Linux I get a ton of java.io.FileNotFoundException. The Installer tries to download the files to: /tmpskyclient-universal-cache/ Seems that a slash is missing, it should for sure be: /tmp/skyclient-universal-cache/

Downloading https://cdn.jsdelivr.net/gh/nacrt/SkyblockClient-REPO@main/files/icons/skyclient.png to /tmpskyclient-universal-cache/skyclient.png
java.io.FileNotFoundException: /tmpskyclient-universal-cache/skyclient.png (Datei oder Verzeichnis nicht gefunden)
    at java.base/java.io.FileOutputStream.open0(Native Method)
    at java.base/java.io.FileOutputStream.open(FileOutputStream.java:293)
    at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:235)
    at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:123)
    at io.github.koxx12dev.universal.utils.Http.download(Http.java:59)
    at io.github.koxx12dev.universal.guis.Installer.lambda$addModPanel$7(Installer.java:309)
    at java.base/java.lang.Thread.run(Thread.java:833)
javax.imageio.IIOException: Can't read input file!
    at java.desktop/javax.imageio.ImageIO.read(ImageIO.java:1310)
    at io.github.koxx12dev.universal.guis.Installer.lambda$addModPanel$7(Installer.java:310)
    at java.base/java.lang.Thread.run(Thread.java:833)
Downloading Icon for GUI Bundle
TheCherry commented 2 years ago

FileSystems.getDefault().getSeparator() works better.

TheCherry commented 2 years ago

https://github.com/SkyblockClient/Skyclient-installer-Java/pull/19

OptixWolf commented 1 year ago

Here is a fix for this: sudo mkdir /tmpskyclient-universal-cache There you create the folder in the root dir. sudo chown username:group -R /tmpskyclient-universal-cache There you set the rights for the folder that you can access it.