tweak
This commit is contained in:
parent
3905053a18
commit
32d9813b1d
1 changed files with 4 additions and 5 deletions
|
@ -92,11 +92,10 @@ isBareRepo = fromRepo Git.repoIsLocalBare
|
||||||
- copies of the key is > or < than the numcopies setting, before running
|
- copies of the key is > or < than the numcopies setting, before running
|
||||||
- the action. -}
|
- the action. -}
|
||||||
autoCopies :: Key -> (Int -> Int -> Bool) -> Maybe Int -> CommandStart -> CommandStart
|
autoCopies :: Key -> (Int -> Int -> Bool) -> Maybe Int -> CommandStart -> CommandStart
|
||||||
autoCopies key vs numcopiesattr a = do
|
autoCopies key vs numcopiesattr a = Annex.getState Annex.auto >>= auto
|
||||||
auto <- Annex.getState Annex.auto
|
where
|
||||||
if auto
|
auto False = a
|
||||||
then do
|
auto True = do
|
||||||
needed <- getNumCopies numcopiesattr
|
needed <- getNumCopies numcopiesattr
|
||||||
(_, have) <- trustPartition UnTrusted =<< keyLocations key
|
(_, have) <- trustPartition UnTrusted =<< keyLocations key
|
||||||
if length have `vs` needed then a else stop
|
if length have `vs` needed then a else stop
|
||||||
else a
|
|
||||||
|
|
Loading…
Reference in a new issue