diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2009-01-21 09:04:31 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2009-01-21 09:04:31 +0000 |
commit | 600f9e7e031c9e7244e078f35ec6c8dce1011149 (patch) | |
tree | b1f1f4393b604c60e78be6012f317156d1d36443 /src | |
parent | 02073e84d6963acb3d85e6c6ddf77ae59abc89e0 (diff) | |
download | apk-tools-600f9e7e031c9e7244e078f35ec6c8dce1011149.tar.gz apk-tools-600f9e7e031c9e7244e078f35ec6c8dce1011149.tar.bz2 apk-tools-600f9e7e031c9e7244e078f35ec6c8dce1011149.tar.xz apk-tools-600f9e7e031c9e7244e078f35ec6c8dce1011149.zip |
Revert "pkg: use absolute filenames for packages"
This reverts commit 46430ceb5607ac9e395432648c6a8c1a7cbceaf1.
The problem this was suppoed to fix was fixed by letting apk_db_open()
return with same working dir.
Diffstat (limited to 'src')
-rw-r--r-- | src/package.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/package.c b/src/package.c index 25f09d6..d4147ff 100644 --- a/src/package.c +++ b/src/package.c @@ -13,7 +13,6 @@ #include <fcntl.h> #include <ctype.h> #include <stdio.h> -#include <limits.h> #include <malloc.h> #include <string.h> #include <stdlib.h> @@ -326,16 +325,12 @@ struct apk_package *apk_pkg_read(struct apk_database *db, const char *file) { struct read_info_ctx ctx; struct apk_bstream *bs; - char realfile[PATH_MAX]; - - if (realpath(file, realfile) < 0) - return NULL; ctx.pkg = apk_pkg_new(); if (ctx.pkg == NULL) return NULL; - bs = apk_bstream_from_file(realfile); + bs = apk_bstream_from_file(file); if (bs == NULL) goto err; @@ -360,7 +355,7 @@ struct apk_package *apk_pkg_read(struct apk_database *db, const char *file) }; apk_deps_add(&ctx.pkg->depends, &dep); } - ctx.pkg->filename = strdup(realfile); + ctx.pkg->filename = strdup(file); return ctx.pkg; err: |