xbps-create: handle correctly another case of relative symlinks.

This commit is contained in:
Juan RP
2015-02-19 09:44:09 +01:00
parent 9c47bc0b1a
commit 69e3a50e75
2 changed files with 30 additions and 1 deletions

View File

@@ -283,7 +283,7 @@ ftw_cb(const char *fpath, const struct stat *sb, int type, struct FTW *ftwbuf _u
* Check if symlink is absolute or relative; on the former
* make it absolute for the target object.
*/
if (strncmp(buf, "../", 3) == 0) {
if (strstr(buf, "./")) {
p = realpath(fpath, NULL);
if (p == NULL) {
/*