diff options
author | Joey Hess <joey@kitenet.net> | 2012-11-29 16:46:59 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-11-29 16:54:51 -0400 |
commit | 63a2756c8685418ec3743dca1cd7a5f0237f0762 (patch) | |
tree | 9f5206fcd943ebc1cd4d4f0da666c5e7a98ca9ae | |
parent | f2214ee8978ee123a9833ab81d2e78a7d1867f71 (diff) |
remove hard link when sanity check failed
-rw-r--r-- | Assistant/Threads/Committer.hs | 5 | ||||
-rw-r--r-- | debian/changelog | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/Assistant/Threads/Committer.hs b/Assistant/Threads/Committer.hs index 445e44dea..ca2148236 100644 --- a/Assistant/Threads/Committer.hs +++ b/Assistant/Threads/Committer.hs @@ -213,7 +213,10 @@ handleAdds delayadd cs = returnWhen (null incomplete) $ do ks <- liftIO $ getSymbolicLinkStatus $ contentLocation keysource if deviceID ks == deviceID fs && fileID ks == fileID fs then a - else return Nothing + else do + -- remove the hard link + void $ liftIO $ tryIO $ removeFile $ contentLocation keysource + return Nothing {- Files can Either be Right to be added now, - or are unsafe, and must be Left for later. diff --git a/debian/changelog b/debian/changelog index 440c19514..66c29a634 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,9 @@ git-annex (3.20121128) UNRELEASED; urgency=low * Fix broken .config/git-annex/program installed by standalone tarball. * assistant: Retrival from glacier now handled. * Include ssh in standalone tarball and OSX app. + * watch: Avoid leaving hard links to files behind in .git/annex/tmp + if a file is deleted or moved while it's being quarantined in preparation + to being added to the annex. -- Joey Hess <joeyh@debian.org> Wed, 28 Nov 2012 13:31:07 -0400 |