mirror of
https://github.com/rustic-rs/rustic.git
synced 2025-10-26 11:18:51 +00:00
Merge pull request #656 from rustic-rs/prune-max-repack
prune: fix --max-repack
This commit is contained in:
commit
409dc0a7aa
@ -5,6 +5,7 @@ Breaking changes:
|
||||
Bugs fixed:
|
||||
- backup crashed when there was a non-unicode link target. The crash has been fixed. However, non-unicode link targets are still unsupported.
|
||||
- Extended attributes which were saved with value null couldn't be handled. This has been fixed.
|
||||
- prune: --max-repack didn't work with a given percentage of repo size. This has been fixed.
|
||||
|
||||
New features:
|
||||
- copy: Added --init option to initialize uninitialized target repos
|
||||
|
||||
@ -574,7 +574,7 @@ impl Pruner {
|
||||
let max_repack = match max_repack {
|
||||
LimitOption::Unlimited => u64::MAX,
|
||||
LimitOption::Size(size) => size.as_u64(),
|
||||
LimitOption::Percentage(p) => p * self.stats.size.sum().total(),
|
||||
LimitOption::Percentage(p) => (p * self.stats.size.sum().total()) / 100,
|
||||
};
|
||||
|
||||
self.repack_candidates.sort_unstable_by_key(|rc| rc.0);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user