diff options
author | Joey Hess <joey@kitenet.net> | 2011-09-15 16:24:47 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-09-15 16:24:47 -0400 |
commit | 456b45b9b3982d9440a43ec014635dee15066f0e (patch) | |
tree | 18760407864d501595b0cf89de00c755a0105931 /Command/Drop.hs | |
parent | d036cd590f5c3c4edcd025effcf57c3d16886559 (diff) |
move annex.numcopies parsing into withNumCopies
Diffstat (limited to 'Command/Drop.hs')
-rw-r--r-- | Command/Drop.hs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Command/Drop.hs b/Command/Drop.hs index 1325e3dcb..4a7596921 100644 --- a/Command/Drop.hs +++ b/Command/Drop.hs @@ -14,7 +14,6 @@ import LocationLog import Types import Content import Messages -import Utility import Utility.Conditional import Trust import Config @@ -28,16 +27,14 @@ seek = [withNumCopies start] {- Indicates a file's content is not wanted anymore, and should be removed - if it's safe to do so. -} -start :: CommandStartAttrFile -start (file, attr) = isAnnexed file $ \(key, _) -> do +start :: FilePath -> Maybe Int -> CommandStart +start file numcopies = isAnnexed file $ \(key, _) -> do present <- inAnnex key if present then autoCopies key (>) numcopies $ do showStart "drop" file next $ perform key numcopies else stop - where - numcopies = readMaybe attr perform :: Key -> Maybe Int -> CommandPerform perform key numcopies = do |