diff options
Diffstat (limited to 'Command/DropUnused.hs')
-rw-r--r-- | Command/DropUnused.hs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Command/DropUnused.hs b/Command/DropUnused.hs index 861c78c90..965a99ed5 100644 --- a/Command/DropUnused.hs +++ b/Command/DropUnused.hs @@ -58,14 +58,13 @@ start (unused, unusedbad, unusedtmp) s = notBareRepo $ search next $ a key perform :: Key -> CommandPerform -perform key = do - from <- Annex.getState Annex.fromremote - case from of - Just name -> do +perform key = maybe droplocal dropremote =<< Annex.getState Annex.fromremote + where + dropremote name = do r <- Remote.byName name showNote $ "from " ++ Remote.name r ++ "..." next $ Command.Move.fromCleanup r True key - _ -> do + droplocal = do backend <- keyBackend key Command.Drop.perform key backend (Just 0) -- force drop |