summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-01-26 14:48:19 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-01-26 14:48:19 -0400
commitbde0321f9e3766641cbfee10e4ead86394a0cf41 (patch)
treeff1f7292a9787cec2899092f10479d3de77eb62f
parent3db186ad962fed98d5d96061bad127a9c344398f (diff)
add the known associated file to the list of others
-rw-r--r--Annex/Drop.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/Annex/Drop.hs b/Annex/Drop.hs
index e5508b2b0..000e4f84a 100644
--- a/Annex/Drop.hs
+++ b/Annex/Drop.hs
@@ -54,7 +54,9 @@ handleDropsFrom locs rs reason fromhere key afile preverified runner = do
g <- Annex.gitRepo
map (`fromTopFilePath` g) <$> Database.Keys.getAssociatedFiles key
)
- let fs = if null l then maybeToList afile else l
+ let fs = case afile of
+ Just f -> nub (f : l)
+ Nothing -> l
n <- getcopies fs
void $ if fromhere && checkcopies n Nothing
then go fs rs n >>= dropl fs