summaryrefslogtreecommitdiff
path: root/Backend
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2010-10-15 16:52:47 -0400
committerGravatar Joey Hess <joey@kitenet.net>2010-10-15 16:52:47 -0400
commit1f585912e2097234ecad599a072610000e7744f0 (patch)
tree5fd2ac8fc14efd472f55fe5a00c178832712f0b4 /Backend
parent395625d0a7c00457f63925beb31078f3eb3d9f79 (diff)
use basename as key
Diffstat (limited to 'Backend')
-rw-r--r--Backend/Worm.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/Backend/Worm.hs b/Backend/Worm.hs
index 26fffab52..ba79428ef 100644
--- a/Backend/Worm.hs
+++ b/Backend/Worm.hs
@@ -5,12 +5,14 @@ module Backend.Worm (backend) where
import qualified Backend.File
import BackendTypes
+import Utility
+import System.FilePath
backend = Backend.File.backend {
name = "WORM",
getKey = keyValue
}
--- direct mapping from filename to key
+-- direct mapping from basename of filename to key
keyValue :: FilePath -> Annex (Maybe Key)
-keyValue file = return $ Just $ Key ((name backend), file)
+keyValue file = return $ Just $ Key ((name backend), (takeFileName file))