What do you think Andreas? On Tuesday, March 19, 2019 at 7:46:54 PM UTC-4, Tom Va wrote: > > Original error message when I want the wallet to be in mytest dir without > creating it first (--wallet=mytest/wallet create --net=REGTEST): > > > Your proposal (mines would have just been create the dir) > > > > On Tuesday, March 19, 2019 at 6:18:08 AM UTC-4, Andreas Schildbach wrote: >> >> What's the current error message? >> >> I think adding a check (and specific error message) if the proposed >> directory exists would be a good idea. >> >> >> On 19/03/2019 03.24, Tom Va wrote: >> > Is it fair to ask for an enhancement to this method? >> > Either displaying a more meaningful error message with full path to >> > wallet and/or create a wrapper method which will create a folder with >> > the name of the network (MAINNET). >> > I'll do the enhancement if it's a good idea. >> > >> > On Monday, March 18, 2019 at 10:49:29 AM UTC-4, Andreas Schildbach >> wrote: >> > >> > Hmmm, I think generally command line tools do not automatically >> create >> > directories. You're supposed to use mkdir (or similar) explicitly. >> > >> > >> > On 18/03/2019 04.50, Tom Va wrote: >> > > When I run WalletTool to create a wallet why not create the >> wallet >> > in a >> > > folder named after network (MAIN, TEST, REGTEST)? >> > > This could be a little confusing for those running it for the >> > first time. >> > > >> > > The first time I ran it this created the wallet file for MAIN >> called >> > > "wallet". >> > > When I changed to REGTEST and set --wallet=regtest/wallet I got >> an >> > error >> > > saying path cannot be found. >> > > Why not just create the directory? >> > > >> > > Wallet.java >> > > public void saveToFile(File f) throws IOException { >> > > // change this File directory = >> > f.getAbsoluteFile().getParentFile(); >> > > if (directory.exists()) { >> > > directory.mkdirs(); >> > > } >> > > File temp = File.createTempFile("wallet", null, directory); >> > > saveToFile(temp, f); >> > > } >> > > >> > > -- >> > > You received this message because you are subscribed to the >> Google >> > > Groups "bitcoinj" group. >> > > To unsubscribe from this group and stop receiving emails from it, >> > send >> > > an email to bitcoinj+u...@googlegroups.com >> > > <mailto:bitcoinj+u...@googlegroups.com>. >> > > For more options, visit https://groups.google.com/d/optout >> > <https://groups.google.com/d/optout>. >> > >> > >> > -- >> > You received this message because you are subscribed to the Google >> > Groups "bitcoinj" group. >> > To unsubscribe from this group and stop receiving emails from it, send >> > an email to bitcoinj+u...@googlegroups.com >> > <mailto:bitcoinj+u...@googlegroups.com>. >> > For more options, visit https://groups.google.com/d/optout. >> >> >>
-- You received this message because you are subscribed to the Google Groups "bitcoinj" group. To unsubscribe from this group and stop receiving emails from it, send an email to bitcoinj+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.