WORM backend: When adding a file in a subdirectory, avoid including the subdirectory in the key name.

This commit is contained in:
Joey Hess 2014-08-12 14:38:53 -04:00
parent 4ae25032c6
commit f0df660570
3 changed files with 14 additions and 1 deletions

View file

@ -36,7 +36,7 @@ backend = Backend
keyValue :: KeySource -> Annex (Maybe Key)
keyValue source = do
stat <- liftIO $ getFileStatus $ contentLocation source
n <- genKeyName $ keyFilename source
n <- genKeyName $ takeFileName $ keyFilename source
return $ Just $ stubKey
{ keyName = n
, keyBackendName = name backend