Don't try and stat the installation root if it's the empty string.
authorJ. Ali Harlow <ali@juiblex.co.uk>
Tue Jan 13 17:04:51 2009 +0000 (2009-01-13)
changeset 3477538f8dc4425
parent 346 765b72a613b2
child 348 3ad2e14e4cb7
Don't try and stat the installation root if it's the empty string.
librazor/rpm.c
     1.1 --- a/librazor/rpm.c	Mon Jan 12 18:53:02 2009 +0000
     1.2 +++ b/librazor/rpm.c	Tue Jan 13 17:04:51 2009 +0000
     1.3 @@ -754,7 +754,7 @@
     1.4  	installer.root = root;
     1.5  
     1.6  	/* FIXME: Only do this before a transaction, not per rpm. */
     1.7 -	if (stat(root, &buf) < 0 || !S_ISDIR(buf.st_mode)) {
     1.8 +	if (*root && (stat(root, &buf) < 0 || !S_ISDIR(buf.st_mode))) {
     1.9  		fprintf(stderr,
    1.10  			"root installation directory \"%s\" does not exist\n",
    1.11  			root);