QuickHomes

QuickHomes

551k Downloads

Windows Path?

jkroepke opened this issue ยท 6 comments

commented

Hi,

why do you the windows path separator?

File lDataDir = new File(dataDir.getAbsolutePath() + "\\quickhomes");

Its working, but still messy.

root@mcbukolos:~# ls -a /home/minecraft/server/
.                    Fine Technology.log                          journeymap                   OpenComputersMod-1.7.1.43-lua53-native.64.so           snapshots-server           world-20171218-223054.zip
..                   forge-1.12.2-14.23.1.2562-installer.jar.log  libraries                    ops.json                                               structures                 world-20171223-223058.zip
banned-ips.json      forge-1.12.2-14.23.1.2578-installer.jar.log  loading-log.log              options.txt                                            usercache.json             world-20171225-185110.zip
banned-players.json  forge-1.12.2-14.23.1.2581-installer.jar      local                        .\quickhomes                                           usernamecache.json         world-20171225-213647.zip
config               forge-1.12.2-14.23.1.2581-installer.jar.log  logs                         .\quickhomes\05836a8b-4500-415e-b6c8-16fabbca4c48.txt  whitelist.json             world.old
crafttweaker.log     forge-1.12.2-14.23.1.2581-universal.jar      minecraft_server.1.12.2.jar  .\quickhomes\73f65d38-194d-4274-8952-04343b571eea.txt  woot
crash-reports        forge_server.jar                             minemenu                     .\quickhomes\ad4a6ddc-640f-46bd-868f-2a2357956485.txt  world
dynmap               hc-recipes                                   .mixin.out                   scripts                                                world-20171213-193928.zip
eula.txt             hs_err_pid375.log                            mods                         server.properties                                      world-20171216-221358.zip

Since the path begin with a dot, its marked as hidden file in non windows systems

commented

I would probably have to add a manual OS check and change the directory from there. I don't exactly have a Linux system to test on

commented

No, you can safe use slashes. See https://stackoverflow.com/questions/2417485/difference-between-file-separator-and-slash-in-paths

With the Java libraries for dealing with files, you can safely use / (slash, not backslash) on all platforms. The library code handles translating things into platform-specific paths internally.

commented

I seriously cannot upload this file anywhere. It isn't corrupt but both CurseForge and GitHub give me errors when I try to upload it. Seriously, I can't get this thing to you. You can build it yourself if you really need my mod but by now you've probably removed it anyway. Sorry.

commented

I will update the mod.

commented

File separators changed. Issue resolved.

commented

Thanks!