move: --safe/--unsafe and potential drop race fix
move: Added --safe option, which makes move honor numcopies settings. Also --unsafe enables the default behavior, anticipating that the default may one day change. This commit was sponsored by Ethan Aubin.
This commit is contained in:
parent
ae530f043e
commit
af8546990d
11 changed files with 187 additions and 74 deletions
|
@ -202,8 +202,8 @@ requiredContent = do
|
|||
{- In auto mode, only runs the action if there are enough
|
||||
- copies on other semitrusted repositories. -}
|
||||
checkDropAuto :: Bool -> Maybe Remote -> AssociatedFile -> Key -> (NumCopies -> CommandStart) -> CommandStart
|
||||
checkDropAuto automode mremote (AssociatedFile afile) key a =
|
||||
go =<< maybe getNumCopies getFileNumCopies afile
|
||||
checkDropAuto automode mremote afile key a =
|
||||
go =<< getAssociatedFileNumCopies afile
|
||||
where
|
||||
go numcopies
|
||||
| automode = do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue