diff options
Diffstat (limited to 'libraries/base/GHC/Windows.hs')
-rw-r--r-- | libraries/base/GHC/Windows.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libraries/base/GHC/Windows.hs b/libraries/base/GHC/Windows.hs index 0a57fc3368..83f83df949 100644 --- a/libraries/base/GHC/Windows.hs +++ b/libraries/base/GHC/Windows.hs @@ -69,6 +69,7 @@ import GHC.Base import GHC.IO import GHC.Num import System.IO.Error +import Util import qualified Numeric @@ -120,7 +121,7 @@ errCodeToIOError fn_name err_code = do -- XXX we should really do this directly. let errno = c_maperrno_func err_code - let msg' = reverse $ dropWhile isSpace $ reverse msg -- drop trailing \n + let msg' = dropWhileEndLE isSpace msg -- drop trailing \n ioerror = errnoToIOError fn_name errno Nothing Nothing `ioeSetErrorString` msg' return ioerror |