Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
Packages
Cabal
Commits
809a1dea
Commit
809a1dea
authored
Nov 05, 2013
by
Mikhail Glushenkov
Browse files
'tryCanonicalizePath': throw the correct exception type on Windows.
parent
06a974f3
Changes
1
Hide whitespace changes
Inline
Side-by-side
cabal-install/Distribution/Client/Utils.hs
View file @
809a1dea
...
...
@@ -33,8 +33,10 @@ import System.FilePath
import
System.IO.Unsafe
(
unsafePerformIO
)
#
if
defined
(
mingw32_HOST_OS
)
import
Prelude
hiding
(
ioError
)
import
Control.Monad
(
liftM2
,
unless
)
import
System.Directory
(
doesDirectoryExist
)
import
System.IO.Error
(
ioError
,
mkIOError
,
doesNotExistErrorType
)
#
endif
-- | Generic merging utility. For sorted input lists this is a full outer join.
...
...
@@ -148,8 +150,8 @@ tryCanonicalizePath path = do
#
if
defined
(
mingw32_HOST_OS
)
exists
<-
liftM2
(
||
)
(
doesFileExist
ret
)
(
doesDirectoryExist
ret
)
unless
exists
$
e
rror
$
ret
++
": canonicalizePath: does not exist
"
++
"(No such file or directory)"
ioE
rror
$
mkIOError
doesNotExistErrorType
"canonicalizePath
"
Nothing
(
Just
ret
)
#
endif
return
ret
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment