add: When adding a dotfile, avoid treating its name as an extension.
This commit is contained in:
parent
2572950ca7
commit
899983058f
3 changed files with 12 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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 <id@joeyh.name> 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
|
||||
|
|
|
@ -59,3 +59,5 @@ git annex list
|
|||
|
||||
[[!meta author=yoh]]
|
||||
[[!tag projects/datalad]]
|
||||
|
||||
> [[fixed|done]] --[[Joey]]
|
||||
|
|
Loading…
Reference in a new issue