diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-01-26 14:28:43 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-01-26 14:28:43 -0400 |
commit | 4ba917a7a5f67e96c3848ae13c6eaa9eba6300c5 (patch) | |
tree | 9a204ed076e46d14ba3dc3a97f7606af10b63de7 /Annex | |
parent | d059f667d346e1d95a005ea946c41bb69d1dc586 (diff) |
Fix nasty reversion in the last release that broke sync --content's handling of many preferred content expressions.
The type checker should have noticed this, but the changes to mapM
that make it accept any Traversable hid the fact that it was not being
passed a list at all. Thus, what should have returned an empty list most
of the time instead returned [""] which was treated as the name of the
associated file, with disasterout consequences.
When I have time, I should add a test case checking what sync --content
drops. I should also consider replacing mapM with one re-specialized to
lists.
Diffstat (limited to 'Annex')
-rw-r--r-- | Annex/Drop.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Annex/Drop.hs b/Annex/Drop.hs index 8a86c0ba8..e5508b2b0 100644 --- a/Annex/Drop.hs +++ b/Annex/Drop.hs @@ -8,6 +8,7 @@ module Annex.Drop where import Annex.Common +import qualified Annex import Logs.Trust import Annex.NumCopies import Types.Remote (uuid) @@ -49,7 +50,9 @@ handleDropsFrom :: [UUID] -> [Remote] -> Reason -> Bool -> Key -> AssociatedFile handleDropsFrom locs rs reason fromhere key afile preverified runner = do l <- ifM isDirect ( associatedFilesRelative key - , mapM getTopFilePath <$> Database.Keys.getAssociatedFiles key + , do + g <- Annex.gitRepo + map (`fromTopFilePath` g) <$> Database.Keys.getAssociatedFiles key ) let fs = if null l then maybeToList afile else l n <- getcopies fs |