diff --git a/Annex/Tmp.hs b/Annex/Tmp.hs index d3a191f2dd..008b5fd826 100644 --- a/Annex/Tmp.hs +++ b/Annex/Tmp.hs @@ -27,8 +27,9 @@ withOtherTmp a = do addCleanup OtherTmpCleanup cleanupOtherTmp tmpdir <- fromRepo gitAnnexTmpOtherDir tmplck <- fromRepo gitAnnexTmpOtherLock - void $ createAnnexDirectory tmpdir - withSharedLock (const tmplck) (a tmpdir) + withSharedLock (const tmplck) $ do + void $ createAnnexDirectory tmpdir + a tmpdir -- | Cleans up any tmp files that were left by a previous -- git-annex process that got interrupted or failed to clean up after diff --git a/CHANGELOG b/CHANGELOG index 1f3481b20b..3e691dfd36 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -9,6 +9,8 @@ git-annex (7.20190130) UNRELEASED; urgency=medium before versioning was enabled on it. * Improved speed of S3 remote by only loading S3 creds once. * Display progress bar when getting files from export remotes. + * Fix race in cleanup of othertmp directory that could result in a failure + attempting to access it. -- Joey Hess Wed, 30 Jan 2019 12:30:22 -0400