replace R.doesPathExist with doesPathExist

Equivilant, just avoids some ugliness.
This commit is contained in:
Joey Hess 2025-02-11 12:46:14 -04:00
parent 5dbaaae299
commit 3bbabd6778
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
4 changed files with 8 additions and 9 deletions

View file

@ -387,7 +387,7 @@ getViaTmp rsp v key af sz action =
getViaTmpFromDisk :: RetrievalSecurityPolicy -> VerifyConfig -> Key -> AssociatedFile -> (OsPath -> Annex (Bool, Verification)) -> Annex Bool
getViaTmpFromDisk rsp v key af action = checkallowed $ do
tmpfile <- prepTmp key
resuming <- liftIO $ R.doesPathExist $ fromOsPath tmpfile
resuming <- liftIO $ doesPathExist tmpfile
(ok, verification) <- action tmpfile
-- When the temp file already had content, we don't know if
-- that content is good or not, so only trust if it the action
@ -521,7 +521,7 @@ moveAnnex key af src = ifM (checkSecureHashes' key)
, return False
)
where
storeobject dest = ifM (liftIO $ R.doesPathExist $ fromOsPath dest)
storeobject dest = ifM (liftIO $ doesPathExist dest)
( alreadyhave
, adjustedBranchRefresh af $ modifyContentDir dest $ do
liftIO $ moveFile src dest
@ -842,7 +842,7 @@ listKeys' keyloc want = do
present _ | inanywhere = pure True
present d = presentInAnnex d
presentInAnnex = R.doesPathExist . fromOsPath . contentfile
presentInAnnex = doesPathExist . contentfile
contentfile d = d </> takeFileName d
{- Things to do to record changes to content when shutting down.