jsipfs add <directory> -r --only-hash outputs hash only for the first file
When trying to add a directory with --only-hash option it only outputs hash of one file in that directory. Unlike go-ipfs, which works correctly
./ipfs$ ls temp_folder/
file1.txt file2.txt
./ipfs$ ipfs add temp_folder/ -r --only-hash
added QmUbWZYLu5YBnzbxtkgv6BoXmvjMfHTFiU1L9G3DABiAHZ temp_folder/file1.txt
added QmZ1sZS9Xp5PdkdQ2mf9tJuBaVRxEX2eBsbzeQ9FvoqBKJ temp_folder/file2.txt
added QmVcSRW5fbqQNxc5RxMKsfMDcJ8xHTULvQViPfnX68hAG1 temp_folder
32 B / 32 B [=========================================================]
./ipfs$ jsipfs add temp_folder/ -r --only-hash
added QmUbWZYLu5YBnzbxtkgv6BoXmvjMfHTFiU1L9G3DABiAHZ temp_folder/file1.txt
I think the return here should be a continue:
I actually spotted this and changed it in https://github.com/ipfs/js-ipfs/pull/2683/files#diff-3891f448a2eed338148ea3e5f82c4c18R62-R70
@achingbrain does that look right to you?
Yes, looks right. Should be a simple fix - @Velenir would you like to submit a PR for this?
If you could add a test similar to this one that tests directories (or just importing multiple things) it should prevent a regression in future.
This has been resolved in #2726 and a test added in ipfs/interface-js-ipfs-core#587
@Velenir you can now use the RC release 0.41.0-rc.0 which has this fix in it.