#3975: filepath: normalise trailing dot
---------------------------------+------------------------------------------
    Reporter:  conrad            |       Owner:                             
        Type:  proposal          |      Status:  new                        
    Priority:  normal            |   Component:  libraries/base             
     Version:  6.12.1            |    Keywords:  filepath normalise         
          Os:  Unknown/Multiple  |    Testcase:                             
Architecture:  Unknown/Multiple  |     Failure:  Incorrect result at runtime
---------------------------------+------------------------------------------
 This darcs patch modifies the behaviour of normalise to handle
 trailing dots in a path. The previous behaviour yielded this:

 {{{
 Prelude System.FilePath> normalise "../."
 "../."
 Prelude System.FilePath> normalise ".././"
 ".././"
 Prelude System.FilePath> normalise ".././.."
 "../.."
 }}}

 This patch modifies dropDots such that the check for (".":[]) only
 occurs once for the path, after which a driver function dropDots' is
 used which skips this check. Hence "." can be removed from the end of
 a longer path, but a path of just "." is unchanged.

 http://www.haskell.org/pipermail/libraries/2010-February/013030.html

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3975>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to