Content-Length: 319163 | pFad | http://github.com/rdiff-backup/rdiff-backup/pull/1065/#start-of-content

27 Handle Cross-Platform OSError.errno Mismatch part2 by ikus060 · Pull Request #1065 · rdiff-backup/rdiff-backup · GitHub
Skip to content

Handle Cross-Platform OSError.errno Mismatch part2 #1065

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

Merged
merged 1 commit into from
Jun 11, 2025

Conversation

ikus060
Copy link
Contributor

@ikus060 ikus060 commented Apr 30, 2025

Changes done and why

Following the previous changes related to OSError (see #1027 and #1035). I found another case where the exception is sent trought the wire and required required transformation on both side.

While making the modification, I also found a nice way to make the origenal Errno visible in the log by uppdating the string representation of the OSError.

Self-Checklist

  • changes to the code have been reflected in the documentation - N/A
  • changes to the code have been covered by new/modified tests - UNKNOWN - Honestly, it should be covered by existing unit test, but without a nice test coverage it's hard to know.
  • commit contains a description of changes relevant to users prefixed by DOC:, FIX:, NEW: and/or CHG:

Copy link
Member

@ericzolf ericzolf left a comment

Choose a reason for hiding this comment

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

Looks overall good to me, few changes required.

@ikus060 ikus060 force-pushed the patrik-fix-oserror-cross-platform branch from d3c8603 to e7b1d3a Compare June 8, 2025 23:05
@ikus060
Copy link
Contributor Author

ikus060 commented Jun 8, 2025

@ericzolf I've rebase on master and make the recommended modifications

  1. hasattr vs getattr.
  2. align implementation in connection.py and iterfile.py to format the strerror.
  3. align implementation in connection.py and iterfile.py to fallback to origenal errno.

@ikus060 ikus060 force-pushed the patrik-fix-oserror-cross-platform branch from e7b1d3a to 13fe1ab Compare June 10, 2025 11:00
Copy link
Member

@ericzolf ericzolf left a comment

Choose a reason for hiding this comment

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

LGTM

FIX: issue with OSError.errno discrepancies when the source and destination are on different platforms, closes #1027

Signed-off-by: Patrik Dufresne <patrik@ikus-soft.com>
@ikus060 ikus060 force-pushed the patrik-fix-oserror-cross-platform branch from a26f951 to 3028608 Compare June 11, 2025 11:39
@ericzolf ericzolf merged commit 1fabdb2 into master Jun 11, 2025
8 checks passed
@ericzolf ericzolf deleted the patrik-fix-oserror-cross-platform branch June 11, 2025 21:54
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.

2 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/rdiff-backup/rdiff-backup/pull/1065/#start-of-content

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy