webapp: Fix bug setting up ssh repo if the user enters "~/" at the start of the path.
This commit is contained in:
parent
c8e6947693
commit
f1fe8edbbb
3 changed files with 8 additions and 0 deletions
|
@ -49,6 +49,7 @@ makeSshRemote forcersync sshdata mcost = do
|
|||
h = sshHostName sshdata
|
||||
d
|
||||
| T.pack "/" `T.isPrefixOf` sshDirectory sshdata = sshDirectory sshdata
|
||||
| T.pack "~/" `T.isPrefixOf` sshDirectory sshdata = T.concat [T.pack "/", sshDirectory sshdata]
|
||||
| otherwise = T.concat [T.pack "/~/", sshDirectory sshdata]
|
||||
|
||||
{- Runs an action that returns a name of the remote, and finishes adding it. -}
|
||||
|
|
2
debian/changelog
vendored
2
debian/changelog
vendored
|
@ -9,6 +9,8 @@ git-annex (4.20130622) UNRELEASED; urgency=low
|
|||
server.
|
||||
* webapp: Ensure that ssh keys generated for different directories
|
||||
on a server are always different.
|
||||
* webapp: Fix bug setting up ssh repo if the user enters "~/" at the start
|
||||
of the path.
|
||||
|
||||
-- Joey Hess <joeyh@debian.org> Fri, 21 Jun 2013 13:16:17 -0400
|
||||
|
||||
|
|
|
@ -42,3 +42,8 @@ git and git-annex are available on the Remote Server
|
|||
> `mangleSshHostName` would need to be changed to generate different mangled
|
||||
> hostnames in all cases. Currently, it skips non-alpha-numeric
|
||||
> characters in the directory. [[done]] --[[Joey]]
|
||||
> --[[Joey]]
|
||||
>
|
||||
> Additionally, just entering a path starting with "~/" would cause this
|
||||
> error, since the webapp tacks on "/~/" to make a relative path absolute.
|
||||
> I've also fixed that. [[done]] --[[Joey]]
|
||||
|
|
Loading…
Add table
Reference in a new issue