summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2007-02-08 18:38:50 +0000
committerEric Andersen <andersen@codepoet.org>2007-02-08 18:38:50 +0000
commitb48d0504bb32759b61ec25b818c669587e9b34cd (patch)
tree4f3b49cf70a2915fd8fffb05a2539df0cba101db
parent66b987ac3bcbe9dfc1ee4eb76dddeb1d5f9f30b2 (diff)
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.
-rw-r--r--libc/stdlib/realpath.c2
1 files changed, 1 insertions, 1 deletions
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. */