Fixes BORG_CACHE_DIR crashing borg if empty#5485
Merged
ThomasWaldmann merged 8 commits intoborgbackup:masterfrom Nov 22, 2020
Merged
Fixes BORG_CACHE_DIR crashing borg if empty#5485ThomasWaldmann merged 8 commits intoborgbackup:masterfrom
ThomasWaldmann merged 8 commits intoborgbackup:masterfrom
Conversation
This patch introduces a new function that atomically checks if the given directory exists or not, and if not, tries to fix it. Still have a problem when reraising the error to remove the traceback.
Member
ThomasWaldmann
left a comment
There was a problem hiding this comment.
thanks for the PR!
i mainly commented on the new function, let's first improve that one.
Contributor
Author
|
Thanks for all these comments, I will make the changes you requested ASAP :) |
…l match all errors
Removes the logging as well
Contributor
Author
|
Sorry I quite forgot about this issue, I will fix the last few things tonight. |
Update the docstring, the return value and removes the tests of return of `ensure_dir`
Member
|
Thanks! Do you want to backport to 1.1-maint? |
Contributor
Author
|
Sure, I'll backport it! |
Merged
ThomasWaldmann
added a commit
to ThomasWaldmann/borg
that referenced
this pull request
Apr 19, 2021
This is a backport of borgbackup#5485.
This was referenced Apr 19, 2021
ThomasWaldmann
added a commit
to ThomasWaldmann/borg
that referenced
this pull request
Apr 19, 2021
this bug was introduced by PR borgbackup#5485 and also affects backport PR borgbackup#5774.
ThomasWaldmann
added a commit
to ThomasWaldmann/borg
that referenced
this pull request
Apr 19, 2021
this bug was introduced by PR borgbackup#5485 and also affects backport PR borgbackup#5774.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This patch introduces a new function that atomically checks if the given
directory exists or not, and if not, tries to fix it.
The error is reraised if necessary with a nice catching.
Fixes #5216.