aboutsummaryrefslogtreecommitdiffstats
path: root/URPM.xs
diff options
context:
space:
mode:
Diffstat (limited to 'URPM.xs')
-rw-r--r--URPM.xs4
1 files changed, 2 insertions, 2 deletions
diff --git a/URPM.xs b/URPM.xs
index 1fe6a6b..1bab88c 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -1662,7 +1662,7 @@ rpmdb_convert(const char *prefix, int dbtype, int swap, int rebuild) {
addMacro(NULL, "__dbi_txn", NULL, "create mpool txn thread thread_count=64 nofsync", -1);
/* (ugly) clear any existing locks */
- fn = rpmGetPath(prefix[0] ? prefix : "", dbpath, "/", "__db.*", NULL);
+ fn = rpmGetPath(prefix && prefix[0] ? prefix : "", dbpath, "/", "__db.*", NULL);
xx = Glob(fn, 0, NULL, &gl);
for (i = 0; i < (int)gl.gl_pathc; i++)
xx = Unlink(gl.gl_pathv[i]);
@@ -1940,7 +1940,7 @@ rpmdb_convert(const char *prefix, int dbtype, int swap, int rebuild) {
fn = _free(fn);
/* clear locks */
- fn = rpmGetPath(prefix[0] ? prefix : "", dbpath, "/", "__db.*", NULL);
+ fn = rpmGetPath(prefix && prefix[0] ? prefix : "", dbpath, "/", "__db.*", NULL);
xx = Glob(fn, 0, NULL, &gl);
for (i = 0; i < (int)gl.gl_pathc; i++)
xx = Unlink(gl.gl_pathv[i]);