summaryrefslogtreecommitdiff
path: root/Utility
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-07-22 13:48:50 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-07-22 14:30:43 -0400
commit4ec9244f1af85b95d014103d93de913026b20fe3 (patch)
treec2ca5dbdc4817f1078b76cd445a4fa69531e905c /Utility
parente4592649d68535ad45fe37449a90427e84734359 (diff)
add a path field to remotes
Also broke out some helper functions around constructing remotes, to be used later.
Diffstat (limited to 'Utility')
-rw-r--r--Utility/RsyncFile.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/Utility/RsyncFile.hs b/Utility/RsyncFile.hs
index 075e91d23..5a9a256a9 100644
--- a/Utility/RsyncFile.hs
+++ b/Utility/RsyncFile.hs
@@ -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