[commit: packages/directory] master: Implement safer version of canonicalizePath for POSIX (f7b8c8a)

git at git.haskell.org git at git.haskell.org
Fri Dec 18 09:51:09 UTC 2015


Repository : ssh://git@git.haskell.org/directory

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/f7b8c8ac527b6453925acf10bf2a95c61081ac04/directory

>---------------------------------------------------------------

commit f7b8c8ac527b6453925acf10bf2a95c61081ac04
Author: Phil Ruffwind <rf at rufflewind.com>
Date:   Sun May 31 04:20:07 2015 -0400

    Implement safer version of canonicalizePath for POSIX
    
    Apply realpath to the largest prefix of the given path that is still
    accessible (that can be stat successfully) so that canonicalizePath will
    return reasonable results even for non-existent paths.  It should very
    rarely throw exceptions now.
    
    Fixes #23.


>---------------------------------------------------------------

f7b8c8ac527b6453925acf10bf2a95c61081ac04
 System/Directory.hs              | 100 ++++++++++++++++++++++++---------------
 changelog.md                     |   5 ++
 tests/CanonicalizePath.hs        |  23 +++++++++
 tests/Main.hs                    |   2 +
 tests/Util.hs                    |   8 ++++
 tests/all.T                      |   1 -
 tests/canonicalizePath001.hs     |   8 ----
 tests/canonicalizePath001.stdout |   1 -
 8 files changed, 101 insertions(+), 47 deletions(-)

Diff suppressed because of size. To see it, use:

    git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc f7b8c8ac527b6453925acf10bf2a95c61081ac04


More information about the ghc-commits mailing list