init: Fix a reversion that broke initialization on systems that need to use pid locking

This brings back .git/annex/misctmp, but only for init. If an init
is interrupted while probing using that temp directory, the files it left
will get deleted 1 week later by a subsequent git-annex run.
This commit is contained in:
Joey Hess 2019-09-10 13:37:07 -04:00
parent 07de0e7e9d
commit 94c75d2bd9
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
7 changed files with 42 additions and 13 deletions

View file

@ -266,7 +266,8 @@ gitAnnexTmpOtherDir r = addTrailingPathSeparator $ gitAnnexDir r </> "othertmp"
gitAnnexTmpOtherLock :: Git.Repo -> FilePath
gitAnnexTmpOtherLock r = gitAnnexDir r </> "othertmp.lck"
{- Tmp directory used by old versions of git-annex. -}
{- .git/annex/misctmp/ was used by old versions of git-annex and is still
- used during initialization -}
gitAnnexTmpOtherDirOld :: Git.Repo -> FilePath
gitAnnexTmpOtherDirOld r = addTrailingPathSeparator $ gitAnnexDir r </> "misctmp"