summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: def88e9)
raw | patch | inline | side by side (parent: def88e9)
author | Linus Torvalds <torvalds@g5.osdl.org> | |
Mon, 4 Jul 2005 22:28:19 +0000 (15:28 -0700) | ||
committer | Linus Torvalds <torvalds@g5.osdl.org> | |
Mon, 4 Jul 2005 22:28:19 +0000 (15:28 -0700) |
Remove the "./" at the head, it just looks much nicer.
refs.c | patch | blob | history |
index 447080edde385a470a815944c2f002c1e51699a5..7ccd721a4abdfec68fa9cab1f380569152fe61e9 100644 (file)
--- a/refs.c
+++ b/refs.c
struct dirent *de;
int baselen = strlen(base);
char *path = xmalloc(baselen + 257);
+
+ if (!strncmp(base, "./", 2)) {
+ base += 2;
+ baselen -= 2;
+ }
memcpy(path, base, baselen);
if (baselen && base[baselen-1] != '/')
path[baselen++] = '/';