symfony/Filesystem — pull request #1 by aharonp (2012-06-27 13:53:27+00:00)
Title: I've refactored the makePathRelative function

The function was failing in a number of different use cases because the function was using a naive character offset comparison to determine where the common path stops.

I've fixed this by splitting up the paths into their individual directories and then comparing the directory names.

If the paths match then the function will return `./` and not an empty string. This is for consistency sake, to ensure all returned paths end with `/`.