git-remote-annex: Fix a reversion
Introduced in version 10.20241031 that broke cloning from a special remote retrieveKeyFile changed to use createAnnexDirectory, which means that the path passed to it needs to be under .git git-remote-annex is probably the only thing in git-annex where that was not the case. And there's no real reason it cannot be the case with it either. Just use withOtherTmp.
This commit is contained in:
parent
d2f540b1d2
commit
700be6c38f
3 changed files with 27 additions and 7 deletions
|
@ -48,6 +48,7 @@ import Annex.Init
|
|||
import Annex.UUID
|
||||
import Annex.Content
|
||||
import Annex.Perms
|
||||
import Annex.Tmp
|
||||
import Annex.SpecialRemote.Config
|
||||
import Remote.List
|
||||
import Remote.List.Util
|
||||
|
@ -719,13 +720,14 @@ downloadManifest rmt = get mkmain >>= maybe (get mkbak) (pure . Just)
|
|||
-- directory. The content of manifests is not stable, and so
|
||||
-- it needs to re-download it fresh every time, and the object
|
||||
-- file should not be stored locally.
|
||||
gettotmp dl = withTmpFile "GITMANIFEST" $ \tmp tmph -> do
|
||||
liftIO $ hClose tmph
|
||||
_ <- dl tmp
|
||||
b <- liftIO (B.readFile tmp)
|
||||
case parseManifest b of
|
||||
Right m -> Just <$> verifyManifest rmt m
|
||||
Left err -> giveup err
|
||||
gettotmp dl = withOtherTmp $ \othertmp ->
|
||||
withTmpFileIn (fromRawFilePath othertmp) "GITMANIFEST" $ \tmp tmph -> do
|
||||
liftIO $ hClose tmph
|
||||
_ <- dl tmp
|
||||
b <- liftIO (B.readFile tmp)
|
||||
case parseManifest b of
|
||||
Right m -> Just <$> verifyManifest rmt m
|
||||
Left err -> giveup err
|
||||
|
||||
getexport _ [] = return Nothing
|
||||
getexport mk (loc:locs) =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue