summaryrefslogtreecommitdiff
path: root/Utility/Path.hs
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2014-10-12 14:32:56 -0400
committerJoey Hess <joey@kitenet.net>2014-10-12 14:32:56 -0400
commitefef527d5b2e42e261fa7af6947aad6553426ebe (patch)
tree082a5dad993557e9dffd76a69d4087371da8ed42 /Utility/Path.hs
parentab1cf3570207bd08ae0abbba183a8c570c0361f5 (diff)
downloadgit-repair-efef527d5b2e42e261fa7af6947aad6553426ebe.tar.gz
Merge from git-annex.
Includes changing to new exceptions library, and some whitespace fixes.
Diffstat (limited to 'Utility/Path.hs')
-rw-r--r--Utility/Path.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/Utility/Path.hs b/Utility/Path.hs
index 99c9438..9035cbc 100644
--- a/Utility/Path.hs
+++ b/Utility/Path.hs
@@ -235,11 +235,11 @@ toCygPath p
| null drive = recombine parts
| otherwise = recombine $ "/cygdrive" : driveletter drive : parts
where
- (drive, p') = splitDrive p
+ (drive, p') = splitDrive p
parts = splitDirectories p'
- driveletter = map toLower . takeWhile (/= ':')
+ driveletter = map toLower . takeWhile (/= ':')
recombine = fixtrailing . Posix.joinPath
- fixtrailing s
+ fixtrailing s
| hasTrailingPathSeparator p = Posix.addTrailingPathSeparator s
| otherwise = s
#endif
@@ -272,7 +272,7 @@ fileNameLengthLimit dir = do
sanitizeFilePath :: String -> FilePath
sanitizeFilePath = map sanitize
where
- sanitize c
+ sanitize c
| c == '.' = c
| isSpace c || isPunctuation c || isSymbol c || isControl c || c == '/' = '_'
| otherwise = c