From: Michael Haggerty Date: Thu, 6 Sep 2012 22:41:03 +0000 (+0200) Subject: real_path(): properly handle nonexistent top-level paths X-Git-Tag: v1.8.0-rc0~57^2~2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/f4c21e89d7c6b578140e90c02b40eccb51ab8428?hp=f4c21e89d7c6b578140e90c02b40eccb51ab8428 real_path(): properly handle nonexistent top-level paths The change has two points: 1. Do not strip off a leading slash, because that erroneously turns an absolute path into a relative path. 2. Do not remove slashes from groups of multiple slashes; instead let chdir() handle them. It could be, for example, that it wants to leave leading double-slashes alone. Signed-off-by: Michael Haggerty Signed-off-by: Junio C Hamano ---