xbps-create(8): calculate correctly target file for relative symlinks.

This commit is contained in:
Juan RP
2013-05-27 10:27:55 +02:00
parent c22dfa8d52
commit d6605e1b97
2 changed files with 3 additions and 1 deletions

View File

@ -237,7 +237,7 @@ ftw_cb(const char *fpath, const struct stat *sb, int type, struct FTW *ftwbuf)
*/
xe->target = strdup(buf);
} else {
xe->target = strdup(p + strlen(destdir));
xe->target = strdup(p + strlen(destdir) - 1);
free(p);
}
} else if (strchr(buf, '/') == NULL) {