mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-13 16:55:10 +00:00
[FIX] Fix minor DB fuckup with tools
Used to open a flatfile database whenever it couldn't find an LMDB one, which obviously caused *problems*
This commit is contained in:
parent
c2536c2e84
commit
1936be0078
2 changed files with 20 additions and 21 deletions
|
|
@ -89,8 +89,12 @@ Main(Array *args, HashMap *env)
|
||||||
glob = ArrayGet(args, 2);
|
glob = ArrayGet(args, 2);
|
||||||
|
|
||||||
parsee = GetDB(db_path);
|
parsee = GetDB(db_path);
|
||||||
if (parsee)
|
if (!parsee)
|
||||||
{
|
{
|
||||||
|
Log(LOG_ERR, "%s: couldn't open config '%s' or couldnt edit DB", exec, db_path);
|
||||||
|
(void) env;
|
||||||
|
return EXIT_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
if (glob)
|
if (glob)
|
||||||
{
|
{
|
||||||
|
|
@ -112,8 +116,3 @@ Main(Array *args, HashMap *env)
|
||||||
DbClose(parsee);
|
DbClose(parsee);
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
Log(LOG_ERR, "%s: couldn't open config '%s' or couldnt edit DB", exec, db_path);
|
|
||||||
(void) env;
|
|
||||||
return EXIT_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,7 @@ GetDB(char *config)
|
||||||
{
|
{
|
||||||
ret = DbOpenLMDB(db_path, lmdb_size);
|
ret = DbOpenLMDB(db_path, lmdb_size);
|
||||||
}
|
}
|
||||||
if (!ret)
|
else
|
||||||
{
|
{
|
||||||
ret = DbOpen(db_path, 0);
|
ret = DbOpen(db_path, 0);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue