From b48d0504bb32759b61ec25b818c669587e9b34cd Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Thu, 8 Feb 2007 18:38:50 +0000 Subject: Miguel Angel Alvarez writes: Hi. I have found a bug in realpath that did not allow me to use it with symlinks. Although I am using 0.9.28.1, the bug is present in 0.9.28 and also in the trunk. I attach a suggested patch. Please let me know if the solution is correct. --- libc/stdlib/realpath.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libc/stdlib/realpath.c') diff --git a/libc/stdlib/realpath.c b/libc/stdlib/realpath.c index aae8580a5..779aa258e 100644 --- a/libc/stdlib/realpath.c +++ b/libc/stdlib/realpath.c @@ -133,7 +133,7 @@ char resolved_path[]; /* Make sure it's null terminated. */ *new_path = '\0'; strcpy(resolved_path, got_path); - return NULL; + return resolved_path; } } else { /* Note: readlink doesn't add the null byte. */ -- cgit v1.2.3