nochowderforyou / clams

Clam Project
MIT License
61 stars 58 forks source link

Unix/Mac: importwallet() rpc does not take a file path correctly with spaces #193

Closed tryphe closed 8 years ago

tryphe commented 9 years ago

Originally we decided that people running Linux wouldn't use spaces, and there wasn't a Mac build. So I figured out that converting to 8.3 format was a viable bandaid, because it omits spaces and still returns a decent entropy for a readable path for std::file. Otherwise, the path gets split and parsed as multiple arguments. Currently there is an ifdef chunk of code that only runs for windows, and converts the paths to 8.3 format, avoiding the problem of passing spaces in the file path in Windows.

see here: https://github.com/nochowderforyou/clams/blob/master/src/qt/bitcoingui.cpp#L1060

There must be a better way of doing this by combining the arguments somehow.

Edit: Maybe this should be submitted as a Bitcoin bug too, unless they fixed it.

tryphe commented 8 years ago

I don't intend to modify the RPC interface to accept escape sequences, because it seems like a poor idea overall.

Closing because files with spaces are fail and should be burned. If you see a wallet with a space in the name, please proceed to burn it.