8000 fix: support `--flush=false` in `files rm` by lidel · Pull Request #10848 · ipfs/kubo · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: support --flush=false in files rm #10848

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

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

Conversation

lidel
Copy link
Member
@lidel lidel commented Jun 24, 2025

This PR aims to close #10842:

  • adds WARNING about --flush=false to --help text in ipfs files commands that support it
  • fixes a gap where ipfs files rm ignored --flush=false and always flushed the parent

@lidel lidel changed the title Fix flush files rm fix: support --flush=false in files rm Jun 24, 2025
Comment on lines -1339 to -1344
err = pdir.Unlink(name)
if err != nil {
return err
if err := pdir.Unlink(name); err != nil {
return err
}
}

return pdir.Flush()
Copy link
Member Author
@lidel lidel Jun 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @gammazero @hsanjuan For a sanity check: Do you know if always flushing the parent of the removed item here, while ignoring --flush=false, was a bug or a conscious design decision?

As this PR stands now, I've "fixed" it by adding support for --flush=false, which allows users to skip flushing the parent of the removed item.
Let me know if you have any concerns about this.

@lidel lidel marked this pull request as ready for review June 24, 2025 17:42
@lidel lidel requested a review from a team as a code owner June 24, 2025 17:42
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.

[Bug Report] MFS files rm is hanging and not resolving
1 participant
0