mirror of
https://github.com/borgbackup/borg.git
synced 2026-05-25 02:33:15 -04:00
config: reject additional_free_space < 10M, fixes #6066
Doesn't mean that 10M is very helpful in out of space conditions, but avoids wrong unit assumptions as in #6066.
This commit is contained in:
parent
a0fbdd978c
commit
4f794bbeea
1 changed files with 5 additions and 0 deletions
|
|
@ -1924,6 +1924,11 @@ class Archiver:
|
|||
minimum = parse_file_size('10M')
|
||||
if wanted != 0 and wanted < minimum:
|
||||
raise ValueError('Invalid value: storage_quota < 10M')
|
||||
elif name == 'additional_free_space':
|
||||
wanted = parse_file_size(value)
|
||||
minimum = parse_file_size('10M')
|
||||
if wanted != 0 and wanted < minimum:
|
||||
raise ValueError('Invalid value: additional_free_space < 10M')
|
||||
elif name == 'max_segment_size':
|
||||
if parse_file_size(value) >= MAX_SEGMENT_SIZE_LIMIT:
|
||||
raise ValueError('Invalid value: max_segment_size >= %d' % MAX_SEGMENT_SIZE_LIMIT)
|
||||
|
|
|
|||
Loading…
Reference in a new issue