legacy: use borg 1.x keys dir for v1 repos#9831
Merged
ThomasWaldmann merged 1 commit intoJun 30, 2026
Merged
Conversation
keyfile lookup always used the borg2 keys dir; on macOS that path differs from borg 1.x, so v1 repo keyfiles were not found.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #9831 +/- ##
==========================================
- Coverage 85.19% 85.12% -0.07%
==========================================
Files 92 93 +1
Lines 15303 15345 +42
Branches 2300 2307 +7
==========================================
+ Hits 13037 13063 +26
- Misses 1578 1587 +9
- Partials 688 695 +7 ☔ View full report in Codecov by Harness. |
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.
Description
Keyfile lookup always used the borg2 keys dir. On macOS that path (
~/Library/Application Support/borg/keys) differs from the borg 1.x one (~/.config/borg/keys), so keyfiles of v1 repos were not found._keys_dir()now returns the borg 1.x keys dir whenrepository.version == 1, the same waysecurity._security_dirpicks the security dir. Both keyfile lookup paths use it. New key creation stays on the borg2 dir.Part of #9556.
Checklist
master