xbps-create(8): record target file or relative symlinks correctly.

This commit is contained in:
Juan RP
2015-02-18 14:55:54 +01:00
parent 628a344560
commit 3c34c300d1
3 changed files with 34 additions and 2 deletions

View File

@ -303,7 +303,8 @@ ftw_cb(const char *fpath, const struct stat *sb, int type, struct FTW *ftwbuf _u
free(p2);
free(p);
}
} else if (strchr(buf, '/') == NULL) {
} else if (buf[0] != '/') {
/* relative path */
p = strdup(filep);
assert(p);
dname = dirname(p);