use basename as key
This commit is contained in:
parent
395625d0a7
commit
1f585912e2
1 changed files with 4 additions and 2 deletions
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue