From: J. Ali Harlow Date: Tue, 13 Jan 2009 17:04:51 +0000 (+0000) Subject: Don't try and stat the installation root if it's the empty string. X-Git-Tag: 0.1~31 X-Git-Url: http://project.juiblex.co.uk/git/?a=commitdiff_plain;h=d2821063f0ff0c1b87a3e3cdaa6b310822e065b8;p=razor.git Don't try and stat the installation root if it's the empty string. --- diff --git a/librazor/rpm.c b/librazor/rpm.c index 7613b54..02fad33 100644 --- a/librazor/rpm.c +++ b/librazor/rpm.c @@ -754,7 +754,7 @@ razor_rpm_install(struct razor_rpm *rpm, const char *root) installer.root = root; /* FIXME: Only do this before a transaction, not per rpm. */ - if (stat(root, &buf) < 0 || !S_ISDIR(buf.st_mode)) { + if (*root && (stat(root, &buf) < 0 || !S_ISDIR(buf.st_mode))) { fprintf(stderr, "root installation directory \"%s\" does not exist\n", root);