Ensure error code is kept if destination dir is not writable#670
Open
ColemanTom wants to merge 1 commit intohpc:mainfrom
Open
Ensure error code is kept if destination dir is not writable#670ColemanTom wants to merge 1 commit intohpc:mainfrom
ColemanTom wants to merge 1 commit intohpc:mainfrom
Conversation
Signed-off-by: ColemanTom <15375218+ColemanTom@users.noreply.github.com>
Author
|
Hi @ofaaland, I was wondering if you are a maintainer and if so, have time to review this small change to ensure an error is returned from dsync when it should be (trying to write to a dir the user does not have access to). Sorry for the nudge, I was just going through checking what PR I have open. |
daltonbohning
approved these changes
Mar 25, 2026
Comment on lines
+3364
to
3365
| rc = errno; | ||
| goto ERROR; |
Collaborator
There was a problem hiding this comment.
This rc=errno seems reasonable, but it seems the goto maybe should actually be goto dsync_common_cleanup since some things like mfu_copy_opts_delete(©_opts); need to be done. Though I'm not sure if everything in that cleanup section is needed
Author
There was a problem hiding this comment.
You're probably correct. I'm happy to change that if you want.
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 resolves #668. The error code was not being retained, so
rcwas stlil zero. I've added it in, keeping theerrnovalue.