I found a bug in SocketPunch v1.2.1 beta, silly bug, but annoying .
If you upload CIA from some folder, then after download is done I delete the folder, click on "Open CIA files" nothing happens, no file browse dialog, but in command prompt (if i start it with java.exe and not javaw.exe) I get
java.lang.IllegalArgumentException: Folder parameter must be a valid folder
So I guess the problem is that it doesn't have "fallback" what to do in case last used path is no longer available and if tries to use it by any means.
Maybe some if else is in order? Something like
I think it's best to go to user's home folder, as it should work crossplatform. Getting current folder of the JAR file is too much work for something that's just a failsafe.
Also, this happens even if you close SocketPunch GUI and start it again later it will remember last folder used, it won't default to some "safe" folder.
If you upload CIA from some folder, then after download is done I delete the folder, click on "Open CIA files" nothing happens, no file browse dialog, but in command prompt (if i start it with java.exe and not javaw.exe) I get
java.lang.IllegalArgumentException: Folder parameter must be a valid folder
So I guess the problem is that it doesn't have "fallback" what to do in case last used path is no longer available and if tries to use it by any means.
Maybe some if else is in order? Something like
Code:
if (new File(path).exists())
jFileChooser.setCurrentDirectory(path);
else
jFileChooser.setCurrentDirectory(new File(System.getProperty("user.home")));
I think it's best to go to user's home folder, as it should work crossplatform. Getting current folder of the JAR file is too much work for something that's just a failsafe.
Also, this happens even if you close SocketPunch GUI and start it again later it will remember last folder used, it won't default to some "safe" folder.
Last edited by Solo761,