convert KeySource to RawFilePath
This commit is contained in:
parent
e468fbc518
commit
c31e1be781
14 changed files with 74 additions and 55 deletions
|
@ -90,7 +90,7 @@ hashKeyVariety (Blake2spHash size) he = Blake2spKey size he
|
|||
{- A key is a hash of its contents. -}
|
||||
keyValue :: Hash -> KeySource -> MeterUpdate -> Annex (Maybe Key)
|
||||
keyValue hash source meterupdate = do
|
||||
let file = contentLocation source
|
||||
let file = fromRawFilePath (contentLocation source)
|
||||
filesize <- liftIO $ getFileSize file
|
||||
s <- hashFile hash file meterupdate
|
||||
return $ Just $ mkKey $ \k -> k
|
||||
|
@ -106,7 +106,7 @@ keyValueE hash source meterupdate =
|
|||
where
|
||||
addE k = do
|
||||
maxlen <- annexMaxExtensionLength <$> Annex.getGitConfig
|
||||
let ext = selectExtension maxlen (toRawFilePath (keyFilename source))
|
||||
let ext = selectExtension maxlen (keyFilename source)
|
||||
return $ Just $ alterKey k $ \d -> d
|
||||
{ keyName = keyName d <> ext
|
||||
, keyVariety = hashKeyVariety hash (HasExt True)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue