optimisation

Avoid trying to read private journal files when no private uuids are
known.
This commit is contained in:
Joey Hess 2021-04-21 16:02:56 -04:00
parent 24eeacdba8
commit d0c5f6d2f0
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -99,7 +99,7 @@ data GetPrivate = GetPrivate Bool
-}
getJournalFileStale :: GetPrivate -> RawFilePath -> Annex (Maybe L.ByteString)
getJournalFileStale (GetPrivate getprivate) file = inRepo $ \g ->
if getprivate
if getprivate && privateUUIDsKnown
then do
x <- getfrom (gitAnnexJournalDir g)
y <- getfrom (gitAnnexPrivateJournalDir g)