diff options
author | June McEnroe <june@causal.agency> | 2019-12-23 21:53:24 -0500 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2019-12-23 21:53:24 -0500 |
commit | 7fd758a4a9b99d79a4c490257f16b2fce506b21c (patch) | |
tree | e79c8d658771001e6d81c1283a0874287575d179 /unscoop.c | |
parent | Factour out verbose, dbStep+reset (diff) | |
download | litterbox-7fd758a4a9b99d79a4c490257f16b2fce506b21c.tar.gz litterbox-7fd758a4a9b99d79a4c490257f16b2fce506b21c.zip |
Take optional explicit path in dbFind
Diffstat (limited to '')
-rw-r--r-- | unscoop.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/unscoop.c b/unscoop.c index 996b929..0b15430 100644 --- a/unscoop.c +++ b/unscoop.c @@ -317,10 +317,8 @@ int main(int argc, char *argv[]) { } } - int flags = SQLITE_OPEN_READWRITE; - sqlite3 *db = (path ? dbOpen(path, flags) : dbFind(flags)); + sqlite3 *db = dbFind(path, SQLITE_OPEN_READWRITE); if (!db) errx(EX_NOINPUT, "database not found"); - if (dbVersion(db) != DatabaseVersion) { errx(EX_CONFIG, "database out of date; migrate with litterbox -m"); } |