fix sizebalanced empty size bug
Fix bug that prevented anything being stored in an empty repository whose preferred content expression uses sizebalanced.
This commit is contained in:
parent
1aacf7ece4
commit
5a4bee24b8
3 changed files with 13 additions and 2 deletions
4
Limit.hs
4
Limit.hs
|
@ -736,8 +736,8 @@ filterCandidatesFullySizeBalanced
|
|||
filterCandidatesFullySizeBalanced maxsizes sizemap n key candidates = do
|
||||
currentlocs <- S.fromList <$> loggedLocations key
|
||||
let keysize = fromMaybe 0 (fromKey keySize key)
|
||||
let go u = case (M.lookup u maxsizes, M.lookup u sizemap, u `S.member` currentlocs) of
|
||||
(Just maxsize, Just reposize, inrepo)
|
||||
let go u = case (M.lookup u maxsizes, fromMaybe (RepoSize 0) (M.lookup u sizemap), u `S.member` currentlocs) of
|
||||
(Just maxsize, reposize, inrepo)
|
||||
| repoHasSpace keysize inrepo reposize maxsize ->
|
||||
proportionfree keysize inrepo u reposize maxsize
|
||||
| otherwise -> Nothing
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue