diff --git a/Backend/Utilities.hs b/Backend/Utilities.hs index 16bbbdc9f9..ad9b142ab9 100644 --- a/Backend/Utilities.hs +++ b/Backend/Utilities.hs @@ -59,8 +59,11 @@ selectExtension maxlen f es = filter (not . S.null) $ reverse $ take 2 $ filter (S.all validInExtension) $ takeWhile shortenough $ - reverse $ S.split (fromIntegral (ord '.')) (P.takeExtensions f) + reverse $ S.split (fromIntegral (ord '.')) (P.takeExtensions f') shortenough e = S.length e <= fromMaybe maxExtensionLen maxlen + -- Avoid treating a file ".foo" as having its whole name as an + -- extension. + f' = S.dropWhile (== fromIntegral (ord '.')) (P.takeFileName f) validInExtension :: Word8 -> Bool validInExtension c diff --git a/CHANGELOG b/CHANGELOG index 7d19283715..e80d9b522b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,9 @@ +git-annex (8.20210804) UNRELEASED; urgency=medium + + * add: When adding a dotfile, avoid treating its name as an extension. + + -- Joey Hess Tue, 03 Aug 2021 12:22:45 -0400 + git-annex (8.20210803) upstream; urgency=medium * whereused: New command, finds what files use a key, or where a key diff --git a/doc/bugs/should_not_assume_entire_name_to_be_an_extension__63__.mdwn b/doc/bugs/should_not_assume_entire_name_to_be_an_extension__63__.mdwn index f7e59773d5..0dd0355d8f 100644 --- a/doc/bugs/should_not_assume_entire_name_to_be_an_extension__63__.mdwn +++ b/doc/bugs/should_not_assume_entire_name_to_be_an_extension__63__.mdwn @@ -59,3 +59,5 @@ git annex list [[!meta author=yoh]] [[!tag projects/datalad]] + +> [[fixed|done]] --[[Joey]]