summaryrefslogtreecommitdiff
path: root/Annex
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-12-26 15:09:53 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-12-26 15:09:53 -0400
commitcc4f53fb3f7789879551fc278dae17296bae7229 (patch)
tree15546ec675a4f19afaea27dcfd0b65035c077e85 /Annex
parent7c9d44a3d87b30d097e99d16ac5c91e0b0614654 (diff)
get associated files from Keys database
Diffstat (limited to 'Annex')
-rw-r--r--Annex/Drop.hs12
1 files changed, 5 insertions, 7 deletions
diff --git a/Annex/Drop.hs b/Annex/Drop.hs
index aabc1c31f..7e494c374 100644
--- a/Annex/Drop.hs
+++ b/Annex/Drop.hs
@@ -18,6 +18,7 @@ import Command
import Annex.Wanted
import Config
import Annex.Content.Direct
+import qualified Database.Keys
import qualified Data.Set as S
import System.Log.Logger (debugM)
@@ -46,14 +47,11 @@ type Reason = String
-}
handleDropsFrom :: [UUID] -> [Remote] -> Reason -> Bool -> Key -> AssociatedFile -> [VerifiedCopy] -> (CommandStart -> CommandCleanup) -> Annex ()
handleDropsFrom locs rs reason fromhere key afile preverified runner = do
- fs <- ifM isDirect
- ( do
- l <- associatedFilesRelative key
- return $ if null l
- then maybeToList afile
- else l
- , return $ maybeToList afile
+ l <- ifM isDirect
+ ( associatedFilesRelative key
+ , Database.Keys.getAssociatedFiles key
)
+ let fs = if null l then maybeToList afile else l
n <- getcopies fs
void $ if fromhere && checkcopies n Nothing
then go fs rs n >>= dropl fs