Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
strbuf_split*(): rename "delim" parameter to "terminator"
[gitweb.git]
/
abspath.c
diff --git
a/abspath.c
b/abspath.c
index 3e8325c7368e1cb2e7f38d7a90aafdf4b9edde0c..05f2d7934878a832f5a2efdf4222c16223050853 100644
(file)
--- a/
abspath.c
+++ b/
abspath.c
@@
-45,8
+45,8
@@
const char *real_path(const char *path)
if (!is_directory(buf)) {
char *last_slash = find_last_dir_sep(buf);
if (last_slash) {
- *last_slash = '\0';
last_elem = xstrdup(last_slash + 1);
+ last_slash[1] = '\0';
} else {
last_elem = xstrdup(buf);
*buf = '\0';