summaryrefslogtreecommitdiff
path: root/Backend/WORM.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-01-06 17:58:57 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-01-06 17:58:57 -0400
commit9504153169360a3c5a2c83b807d3d0be4d82aa28 (patch)
tree59e9edc6f5e999f13c995bb3c35f27e4f06edc6f /Backend/WORM.hs
parent27195fc7ecb70e185e9a78f8bd3d758bfe262a22 (diff)
Generate shorter keys for WORM and URL, avoiding keys that are longer than used for SHA256, so as to not break on systems like Windows that have very small maximum path length limits.
Diffstat (limited to 'Backend/WORM.hs')
-rw-r--r--Backend/WORM.hs3
1 files changed, 1 insertions, 2 deletions
diff --git a/Backend/WORM.hs b/Backend/WORM.hs
index de7779bb3..bd5e374e1 100644
--- a/Backend/WORM.hs
+++ b/Backend/WORM.hs
@@ -34,9 +34,8 @@ keyValue :: KeySource -> Annex (Maybe Key)
keyValue source = do
stat <- liftIO $ getFileStatus $ contentLocation source
relf <- getTopFilePath <$> inRepo (toTopFilePath $ keyFilename source)
- n <- genKeyName relf
return $ Just $ stubKey
- { keyName = n
+ { keyName = genKeyName relf
, keyBackendName = name backend
, keySize = Just $ fromIntegral $ fileSize stat
, keyMtime = Just $ modificationTime stat