1 --- sed/lib/utils.c 2008-11-10 21:35:26.921679024 +0100
2 +++ sed/lib/utils.c 2008-11-10 21:34:45.734498611 +0100
4 ck_follow_symlink(const char * fname)
6 static struct stat statbuf;
11 static size_t bufsize = 1024;
15 /* need to handle relative paths with care */
17 + dir = dirname (buf); // dir part of orig path
18 + len = strlen (dir); // orig path len
19 + if (buf2[0] != '/' && len != 1 && dir[0] != '.')
21 - dir = dirname (buf); // dir part of orig path
22 - int len = strlen (dir); // orig path len
24 strncpy (buf+len+1, buf2, bufsize - len - 1);
25 if (buf[bufsize-1] != 0)