librazor/root.c
changeset 316 5ebed314390c
parent 310 9a7691262ce6
child 317 019a53b65271
     1.1 --- a/librazor/root.c	Wed Jul 02 18:46:47 2008 +0100
     1.2 +++ b/librazor/root.c	Tue Jul 08 22:02:58 2008 -0400
     1.3 @@ -103,6 +103,7 @@
     1.4  razor_root_open(const char *root)
     1.5  {
     1.6  	struct razor_root *image;
     1.7 +	char details_path[PATH_MAX], files_path[PATH_MAX];
     1.8  
     1.9  	assert (root != NULL);
    1.10  
    1.11 @@ -130,8 +131,15 @@
    1.12  
    1.13  	snprintf(image->path, sizeof image->path,
    1.14  		 "%s%s/%s", root, razor_root_path, system_repo_filename);
    1.15 +	snprintf(details_path, sizeof details_path,
    1.16 +		 "%s%s/%s", root, razor_root_path, system_repo_details_filename);
    1.17 +	snprintf(files_path, sizeof files_path,
    1.18 +		 "%s%s/%s", root, razor_root_path, system_repo_files_filename);
    1.19 +
    1.20  	image->system = razor_set_open(image->path);
    1.21 -	if (image->system == NULL) {
    1.22 +	if (image->system == NULL ||
    1.23 +	    razor_set_open_details(image->system, details_path) ||
    1.24 +	    razor_set_open_files(image->system, files_path)) {
    1.25  		unlink(image->new_path);
    1.26  		close(image->fd);
    1.27  		free(image);