refactoring

This commit is contained in:
Joey Hess 2025-02-27 14:54:03 -04:00
parent 9c2c3002a6
commit 1704b5e327
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
3 changed files with 25 additions and 14 deletions

View file

@ -56,3 +56,11 @@ generateEquivilantKey b f =
, contentLocation = f
, inodeCache = Nothing
}
recordVurlKey :: Backend -> OsPath -> Key -> [Key] -> Annex Bool
recordVurlKey b f key eks = generateEquivilantKey b f >>= \case
Nothing -> return False
Just ek -> do
unless (ek `elem` eks) $
setEquivilantKey key ek
return True