Unescape characters in 'file://...' URIs.

That allows, in Git remotes, such URIs to contain spaces or UTF-8
characters. Closes http://git-annex.branchable.com/bugs/Unable_to_use_remotes_with_space_in_the_path/ .
This commit is contained in:
guilhem 2013-08-19 04:31:28 +02:00 committed by Joey Hess
parent 5436fea39b
commit b4a32c7506

View file

@ -91,7 +91,7 @@ fromUrl url
fromUrlStrict :: String -> IO Repo
fromUrlStrict url
| startswith "file://" url = fromAbsPath $ uriPath u
| startswith "file://" url = fromAbsPath $ unEscapeString $ uriPath u
| otherwise = newFrom $ Url u
where
u = fromMaybe bad $ parseURI url