1 May
2014
1 May
'14
1:33 a.m.
canonicalize_md.c does: /* First try realpath() on the entire path */ if (realpath(original, resolved)) { /* That worked, so return it */ collapse(resolved); return 0; } And collapse promises to remove /./ and /../ BUT realpath should have already done that: http://pubs.opengroup.org/onlinepubs/009696899/functions/realpath.html The *realpath*() function shall derive, from the pathname pointed to by *file_name*, an absolute pathname that names the same file, whose resolution does not involve '.', '..', or symbolic links. (although it's true that collapse is not the expensive part of the operation...)