add a path field to remotes

Also broke out some helper functions around constructing remotes,
to be used later.
This commit is contained in:
Joey Hess 2012-07-22 13:48:50 -04:00
parent e4592649d6
commit 4ec9244f1a
10 changed files with 97 additions and 65 deletions

View file

@ -61,3 +61,9 @@ rsyncUrlIsShell s
| c == '/' = False -- got to directory with no colon
| c == ':' = not $ ":" `isPrefixOf` cs
| otherwise = go cs
{- Checks if a rsync url is really just a local path. -}
rsyncUrlIsPath :: String -> Bool
rsyncUrlIsPath s
| rsyncUrlIsShell s = False
| otherwise = ':' `notElem` s