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

Delete empty parent directories on gopass rm -r #1725

Merged
merged 1 commit into from Jan 19, 2021

Conversation

dominikschulz
Copy link
Member

This adds house keeping around empty parent directories. They would
have been left over in some cases. This adds more proetections to avoid
that, i.e. removing empty parents on rm -r (not only rm) as well as
fsck checks.

Fixes #1723

Signed-off-by: Dominik Schulz dominik.schulz@gauner.org

AnomalRoil
AnomalRoil previously approved these changes Jan 18, 2021
Copy link
Member

@AnomalRoil AnomalRoil left a comment

Choose a reason for hiding this comment

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

LGTM

This adds house keeping around empty parent directories. They would
have been left over in some cases. This adds more proetections to avoid
that, i.e. removing empty parents on rm -r (not only rm) as well as
fsck checks.

Fixes gopasspw#1723

RELEASE_NOTES=[BUGFIX] Remove empty parents on gopass rm -r

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
@codecov-io
Copy link

codecov-io commented Jan 19, 2021

Codecov Report

Merging #1725 (03fe264) into master (78aaad1) will decrease coverage by 0.05%.
The diff coverage is 53.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1725      +/-   ##
==========================================
- Coverage   58.11%   58.06%   -0.05%     
==========================================
  Files         189      189              
  Lines        9035     9080      +45     
==========================================
+ Hits         5250     5272      +22     
- Misses       3193     3210      +17     
- Partials      592      598       +6     
Impacted Files Coverage Δ
internal/backend/storage/fs/store.go 47.06% <25.00%> (-0.50%) ⬇️
internal/store/leaf/move.go 49.23% <50.00%> (+0.02%) ⬆️
internal/backend/storage/fs/fsck.go 48.65% <51.43%> (-0.13%) ⬇️
internal/action/delete.go 65.71% <100.00%> (+4.42%) ⬆️
internal/backend/crypto/age/askpass.go 6.90% <0.00%> (-0.80%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 78aaad1...03fe264. Read the comment docs.

@dominikschulz dominikschulz merged commit a1f5496 into gopasspw:master Jan 19, 2021
@dominikschulz dominikschulz deleted the fix/issue-1723 branch January 19, 2021 08:56
kpitt pushed a commit to kpitt/gopass that referenced this pull request Jul 21, 2022
This adds house keeping around empty parent directories. They would
have been left over in some cases. This adds more proetections to avoid
that, i.e. removing empty parents on rm -r (not only rm) as well as
fsck checks.

Fixes gopasspw#1723

RELEASE_NOTES=[BUGFIX] Remove empty parents on gopass rm -r

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
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.

Gopass does not list empty folders and rm -r allows to create them
3 participants