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
|
@ -55,7 +55,7 @@ start o file k = startKey o afile k (mkActionItem afile)
|
|||
startKey :: MirrorOptions -> AssociatedFile -> Key -> ActionItem -> CommandStart
|
||||
startKey o afile key ai = onlyActionOn key $ case fromToOptions o of
|
||||
ToRemote r -> checkFailedTransferDirection ai Upload $ ifM (inAnnex key)
|
||||
( Command.Move.toStart False afile key ai =<< getParsed r
|
||||
( Command.Move.toStart Command.Move.RemoveNever afile key ai =<< getParsed r
|
||||
, do
|
||||
numcopies <- getnumcopies
|
||||
Command.Drop.startRemote afile ai numcopies key =<< getParsed r
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue