-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CLI cannot process multiple passed files with the same name #8264
Comments
Thanks for the report, it looks like the CLI command parser (https://github.com/ipfs/go-ipfs-cmds/blob/4ade007405e5d3befb14184290576c63cc43a6a3/cli/parse.go#L239) bundles up all the files into a map keyed by the file name (not path, inode, etc.) of the files leading to the described issue. Perhaps just keying on path name instead of file name (i.e. removing https://github.com/ipfs/go-ipfs-cmds/blob/4ade007405e5d3befb14184290576c63cc43a6a3/cli/parse.go#L335) would do the job. |
I tested that L335 patch and indeed, it helps to add both files and also helps to get distinct path names in the output:
Thanks. |
It seems, the patch broke something else:
And the other problem I encountered was exceeding the number of open files (1024 by default). The DVD has 5260 files. |
@bmwiedemann are you sure? Does that work without the patch? I tried this and it worked for me:
I'll put up a PR to go-ipfs-cmds and go-ipfs to see how tests look. A couple of side notes that we can discuss further on discuss.ipfs.io if you have additional questions (just tag me):
So it seems pretty strange to me that:
|
The idea is to have https://github.com/bmwiedemann/ipfs-iso-jigsaw/ create a custom UnixFS PB object such as https://www.reddit.com/r/ipfs/comments/ohbqgv/efficiently_store_daily_iso_images/ explains it a bit.
I use |
Hullo team, |
@Zanda256 : it looks like PRs were created for this, and we're waiting to get this merged. @aschmahmann : do you have anyone in mind for the PRs so we can get this merged? |
@schomatis : this would be a good candidate to take on. The existing PRs weren't exactly what's needed. @aschmahmann will add more clarity on how to do this right. |
Internal note: this is something we'd like for go-ipfs 0.13 |
@BigLep , so can I carry on with the implementation? |
@Zanda256 : do you have an implementation separate from the PRs that are linked to this issue? |
I had figured something out, but that was a long time ago. I just need to re-implement it. I'll submit a PR for review when it's ready. |
@schomatis : I'm reopening because there is a linked PR that is still open. Feel free to close if that's wrong. |
Yes, sorry, we need to land the main PR in |
Reopening because #8850 is still open. |
2022-04-28 conversation: Remaining work: |
@BigLep I've been over this issue too many times to the point of losing confidence in my ability to understand exactly what is being requested. If you can provide the exact commands and outputs (either success or error, and what error) I'll give it one last shot. Otherwise, I'll un-assign myself here and someone closer to the request can implement the final details with as much support from me as needed, of course. Blocking until then. |
I don't mind closing this issue. It is not that important. The original idea was that I could do a single For that, the output would need to be something like this: mkdir -p 1 2
echo 1 > 1/x
echo 2 > 2/x
ipfs add 1/x 2/x
added QmdytmR4wULMd3SLo6ePF4s3WcRHWcpnJZ7bHhoj3QB13v 1/x
added QmSFxnK675wQ9Kc1uqWKyJUaNxvSc2BP5DbXCD3x93oq61 2/x |
Version information:
Description:
For https://github.com/bmwiedemann/ipfs-iso-jigsaw/blob/prehashnodirs/prehash.py#L53 I am trying to add files without directories into ipfs and noticed that directories are not printed in output, but what is worse, files are silently not added (or at least not reported)
The text was updated successfully, but these errors were encountered: