From d2821063f0ff0c1b87a3e3cdaa6b310822e065b8 Mon Sep 17 00:00:00 2001 From: J. Ali Harlow Date: Tue, 13 Jan 2009 17:04:51 +0000 Subject: [PATCH] Don't try and stat the installation root if it's the empty string. --- librazor/rpm.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) 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); -- 1.7.1