monero-project / monero

Monero: the secure, private, untraceable cryptocurrency
https://getmonero.org
Other
8.99k stars 3.11k forks source link

Confusing interaction between simplewallet's --restore-deterministic-wallet and --wallet-file #2060

Closed zagaberoo closed 7 years ago

zagaberoo commented 7 years ago

Reproduction:

$ monero-wallet-cli --wallet-file wal --restore-deterministic-wallet --password="asdf" --electrum-seed="gypsy annoyed renting delayed object ostrich vinegar suffice enigma excess paradise five ruling ulcers upon gotten eskimos unquoted plotting cinema jamming bimonthly skulls sleepless delayed"
Monero 'Wolfram Warptangent' (v0.10.3.1-release)
Logging to monero-wallet-cli.log
Error: failed to generate new wallet: failed to save file "": No such file or directory

The presence of --wallet-file seems to skip the file prompt, but then the value is pulled from --generate-new-wallet instead, which is the empty string.

Additionally, unix hidden file droppings are left behind as a quirk of the empty string being used as the base filename:

$ find .
.
./.keys
./.new
./monero-wallet-cli.log
./.address.txt

Simply failing fast by checking for the empty string here would do the trick.

Should I put together a pull request that implements this?

moneromooo-monero commented 7 years ago

Yes, thanks.