Bug fix: Fix tilde expansion in ssh urls when the tilde is the last character in the url. Thanks, Grond for the patch.

This commit is contained in:
Joey Hess 2021-01-18 12:22:48 -04:00
parent a9bf2a6cad
commit 5193aae385
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
3 changed files with 6 additions and 0 deletions

View file

@ -25,6 +25,9 @@ git-annex (8.20201130) UNRELEASED; urgency=medium
Thanks, Kyle Meyer for the patch.
* Windows: Work around win32 length limits when dealing with lock files.
* Bug fix: export with -J could fail when two files had the same content.
* Bug fix: Fix tilde expansion in ssh urls when the tilde is the last
character in the url.
Thanks, Grond for the patch.
-- Joey Hess <id@joeyh.name> Mon, 04 Jan 2021 12:52:41 -0400

View file

@ -187,6 +187,7 @@ expandTilde = expandt True
expandt True ('~':'/':cs) = do
h <- myHomeDir
return $ h </> cs
expandt True "~" = myHomeDir
expandt True ('~':cs) = do
let (name, rest) = findname "" cs
u <- getUserEntryForName name

View file

@ -140,3 +140,5 @@ local repository version: 5
### Have you had any luck using git-annex before? (Sometimes we get tired of reading bug reports all day and a lil' positive end note does wonders)
Definitely! I'm currently writing some personal file synchronization software that uses git-annex for myself, which is how I noticed this bug.
> Thanks for a perfect bug report and patch. [[done]] --[[Joey]]