projects
/
haskell-directory.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e5bc079
)
canonicalizePath should also do System.FilePath.normalise
author
Simon Marlow
<simonmar@microsoft.com>
Tue, 22 Jan 2008 16:59:14 +0000
(16:59 +0000)
committer
Simon Marlow
<simonmar@microsoft.com>
Tue, 22 Jan 2008 16:59:14 +0000
(16:59 +0000)
The example I've found where this is necessary is on Windows:
canonicalizePath on its own doesn't upper-case the drive letter, but
normalise does.
System/Directory.hs
patch
|
blob
|
history
diff --git
a/System/Directory.hs
b/System/Directory.hs
index
42ed6af
..
80a20ee
100644
(file)
--- a/
System/Directory.hs
+++ b/
System/Directory.hs
@@
-584,7
+584,9
@@
canonicalizePath fpath =
#else
do c_realpath pInPath pOutPath
#endif
- peekCString pOutPath
+ path <- peekCString pOutPath
+ return (normalise path)
+ -- normalise does more stuff, like upper-casing the drive letter
#if defined(mingw32_HOST_OS)
foreign import stdcall unsafe "GetFullPathNameA"