Use xbps_get_root() directly where appropiate.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091027111547-tb38qz51ejakn3jc
This commit is contained in:
Juan RP
2009-10-27 12:15:47 +01:00
parent ac897c8383
commit dc258f4e20
11 changed files with 31 additions and 61 deletions

View File

@@ -41,11 +41,10 @@ remove_pkg_files(prop_dictionary_t dict)
prop_object_iterator_t iter;
prop_object_t obj;
prop_bool_t bobj;
const char *file, *rootdir, *sha256;
const char *file, *sha256;
char *path = NULL;
int flags = 0, rv = 0;
rootdir = xbps_get_rootdir();
flags = xbps_get_flags();
/* Links */
@@ -62,7 +61,7 @@ remove_pkg_files(prop_dictionary_t dict)
prop_object_iterator_release(iter);
return EINVAL;
}
path = xbps_xasprintf("%s/%s", rootdir, file);
path = xbps_xasprintf("%s/%s", xbps_get_rootdir(), file);
if (path == NULL) {
prop_object_iterator_release(iter);
return EINVAL;
@@ -97,7 +96,7 @@ files:
prop_object_iterator_release(iter);
return EINVAL;
}
path = xbps_xasprintf("%s/%s", rootdir, file);
path = xbps_xasprintf("%s/%s", xbps_get_rootdir(), file);
if (path == NULL) {
prop_object_iterator_release(iter);
return EINVAL;
@@ -155,7 +154,7 @@ dirs:
prop_object_iterator_release(iter);
return EINVAL;
}
path = xbps_xasprintf("%s/%s", rootdir, file);
path = xbps_xasprintf("%s/%s", xbps_get_rootdir(), file);
if (path == NULL) {
prop_object_iterator_release(iter);
return EINVAL;