diff options
Diffstat (limited to 'URPM.xs')
-rw-r--r-- | URPM.xs | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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]); |