Details
-
Bug
-
Resolution: Won't Fix
-
Minor
-
None
-
1.0
-
None
Description
When trying e.g. to put a file with spaces, an IllegalArgumentException is thrown (see exception below).
This appears to be due to incorrect quoting in the shell scripts (putfile.sh etc). Instead of $*, use "$@" (including quotes!), to make sure all arguments are quoted correctly and passed on intact to the java process.
$ ./putfile.sh -c books -f ~/Downloads/This\ is\ Gallifrey.pdf -i Gallifrey
Initialising arguments...
Creating client.
Putting .
java.lang.IllegalArgumentException: The file '/home/asser/Downloads/This' is invalid. It does not exists or it is a directory.
at org.bitrepository.commandline.CommandLineClient.findTheFile(CommandLineClient.java:276)
at org.bitrepository.commandline.PutFile.putTheFile(PutFile.java:120)
at org.bitrepository.commandline.PutFile.performOperation(PutFile.java:79)
at org.bitrepository.commandline.CommandLineClient.runCommand(CommandLineClient.java:63)
at org.bitrepository.commandline.PutFile.main(PutFile.java:52)