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

2
NEWS
View File

@ -1,5 +1,7 @@
xbps-0.25 (???): xbps-0.25 (???):
* xbps-create(8): correctly calculate target file for relative symlinks.
* xbps-pkgdb(8): removed old code that isn't needed anymore in the 'check' mode. * xbps-pkgdb(8): removed old code that isn't needed anymore in the 'check' mode.
This fixes issue #9 (https://github.com/xtraeme/xbps/issues/9). This fixes issue #9 (https://github.com/xtraeme/xbps/issues/9).

View File

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