diff options
-rw-r--r-- | Backend/WORM.hs | 2 | ||||
-rw-r--r-- | debian/changelog | 2 | ||||
-rw-r--r-- | doc/bugs/WORM_keys_differ_depending_on_working_dir_during_add.mdwn | 11 |
3 files changed, 14 insertions, 1 deletions
diff --git a/Backend/WORM.hs b/Backend/WORM.hs index c972602ad..6ba513960 100644 --- a/Backend/WORM.hs +++ b/Backend/WORM.hs @@ -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 diff --git a/debian/changelog b/debian/changelog index 48b6296d7..722e9347e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -31,6 +31,8 @@ git-annex (5.20140718) UNRELEASED; urgency=medium repositories, for safer detection of eg, renaming of files with the same size and mtime. * direct: Fix ugly warning messages. + * WORM backend: When adding a file in a subdirectory, avoid including the + subdirectory in the key name. -- Joey Hess <joeyh@debian.org> Mon, 21 Jul 2014 14:41:26 -0400 diff --git a/doc/bugs/WORM_keys_differ_depending_on_working_dir_during_add.mdwn b/doc/bugs/WORM_keys_differ_depending_on_working_dir_during_add.mdwn index e41220114..9787ad5cc 100644 --- a/doc/bugs/WORM_keys_differ_depending_on_working_dir_during_add.mdwn +++ b/doc/bugs/WORM_keys_differ_depending_on_working_dir_during_add.mdwn @@ -55,3 +55,14 @@ $ readlink quux Linux 3.15.8 git-annex 5.20140716 + +> This was a bug. I suspect it got broken a while ago and I didn't noticed +> since I rarely use WORM and when I do it's almost always adding files +> in the current directory. [[fixed|done]] to take the filename only. +> +> I don't think it's a problem to have the subdirectory path in the +> existing WORM keys, other than the problems you note with this meaning +> a later add of the same file will generate a different key. So I have not +> done anything to try to fix up existing keys. (If this became a problem, +> I could add upgrade code to the WORM backend.) +> --[[Joey]] |