diff options
Diffstat (limited to 'Annex/Ingest.hs')
-rw-r--r-- | Annex/Ingest.hs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Annex/Ingest.hs b/Annex/Ingest.hs index 7b1db8aa7..c120f1a4d 100644 --- a/Annex/Ingest.hs +++ b/Annex/Ingest.hs @@ -244,10 +244,9 @@ cleanOldKeys file newkey = do topf <- inRepo (toTopFilePath file) oldkeys <- filter (/= newkey) <$> Database.Keys.getAssociatedKey topf - forM_ oldkeys $ \key -> do - obj <- calcRepo (gitAnnexLocation key) - caches <- Database.Keys.getInodeCaches key - unlessM (sameInodeCache obj caches) $ do + forM_ oldkeys $ \key -> + unlessM (isUnmodified key =<< calcRepo (gitAnnexLocation key)) $ do + caches <- Database.Keys.getInodeCaches key unlinkAnnex key fs <- filter (/= ingestedf) . map (`fromTopFilePath` g) |