Skip to content
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

fix: Better functionality for ipfs add --to-files -w #10658

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

ProximaNova
Copy link

@ProximaNova ProximaNova commented Jan 10, 2025

Make ipfs add + --to-files + --wrap-with-directory work by adding the root CID of what was added to MFS. The is different from past official Kubo which did this: added a literal "." folder to MFS (bug). It's also different from current official Kubo: disallow add to be ran with to-files and wrap. Todo/ideas for this fork: make something like --to-files-cid which only adds root added CID to MFS, whether it's a file, folder, ran with wrap, ran without wrap. (Done: add+to-files+wrap always defaults to adding the CID to MFS and not literal "." and not disabled.)

This update makes perfect sense with --to-files; in other words it does the following:

  • Without wrap, the final thing is "[CID] [file/folder name]" -> file/folder name added to MFS.
  • With wrap, the final thing is "[CID]" -> CID added to MFS

If a user ran add + --to-files + -w then it's expected behavior to add the final CID to MFS. It being disabled would be unexpected. BTW, https://github.com/ipfs/community/blob/master/CONTRIBUTING_GO.md says something about changing branch name to something other than "master"; I didn't do that.

@ProximaNova ProximaNova requested a review from a team as a code owner January 10, 2025 05:17
@ProximaNova ProximaNova changed the title Better functionality for ipfs add --to-files -w fix: Better functionality for ipfs add --to-files -w Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant