-
-
Notifications
You must be signed in to change notification settings - Fork 823
Open
Description
#8718 introduced Padmé padding via testing for SPEC=250, but it looks this was never included in a UI roundtrip test, so the ArgumentTypeError here fires anyway:
Lines 713 to 722 in 32c9ce8
| elif self.name == 'obfuscate': | |
| if 3 <= count <= 5: | |
| level = int(values[1]) | |
| if not ((1 <= level <= 6) or (110 <= level <= 123)): | |
| raise ArgumentTypeError("level must be >= 1 and <= 6 or >= 110 and <= 123") | |
| self.level = level | |
| compression = ','.join(values[2:]) | |
| else: | |
| raise ArgumentTypeError("bad arguments") | |
| self.inner = CompressionSpec(compression) |
MVCE as shell session
Positive test: Does creating a repository with Padmé compression as documented in borg help compression work?
= export BORG_REPO=repo
= borg init -e none
= echo meow > file
= borg create ::test ./file -C obfuscate,250,none
usage: borg create [...]
borg create: error: argument -C/--compression: level must be >= 1 and <= 6 or >= 110 and <= 123
= borg list
= # entirely empty
Nope, it doesn't.
Negative test: Does it work with e.g. SPEC=123?
= borg create ::test ./file -C obfuscate,123,none
= borg list
test Tue, 2026-02-03 20:36:24 [...]
Yep, it does.
Other things
Mistakes like these happen, thanks for making borg either way!! It was and is the grounds for my first scripted backup, taking off a huge bit from my daily mental load =^.^=
Seeing that this is still on master and hence in to-be 2.0 code, I'd gladly to type up a PR cleaning up the parsing and fixing this in the process if you want me to!
Reactions are currently unavailable