#50, document makeRelative and explain why it doesn't introduce .. paths
authorNeil Mitchell <ndmitchell@gmail.com>
Tue, 22 Dec 2015 08:02:30 +0000 (08:02 +0000)
committerNeil Mitchell <ndmitchell@gmail.com>
Tue, 22 Dec 2015 08:02:30 +0000 (08:02 +0000)
System/FilePath/Internal.hs

index 52020f6..60903cc 100644 (file)
@@ -729,7 +729,10 @@ equalFilePath a b = f a == f b
             | otherwise = dropTrailingPathSeparator $ normalise x
 
 
--- | Contract a filename, based on a relative path.
+-- | Contract a filename, based on a relative path. Note that the resulting path
+--   will never introduce @..@ paths, as the presence of symlinks means @..\/b@
+--   may not reach @a\/b@ if it starts from @a\/c@. For a worked example see
+--   <http://neilmitchell.blogspot.co.uk/2015/10/filepaths-are-subtle-symlinks-are-hard.html this blog post>.
 --
 --   The corresponding @makeAbsolute@ function can be found in
 --   @System.Directory@.