chiark / gitweb /
Don't attempt to set the database version if TRACKDB_READ_ONLY.
authorRichard Kettlewell <rjk@greenend.org.uk>
Sun, 24 May 2009 11:50:07 +0000 (12:50 +0100)
committerRichard Kettlewell <rjk@greenend.org.uk>
Sun, 24 May 2009 11:50:07 +0000 (12:50 +0100)
lib/trackdb.c

index e1bbfc8..83a67af 100644 (file)
@@ -472,7 +472,7 @@ void trackdb_open(int flags) {
   trackdb_noticeddb = open_db("noticed.db",
                              DB_DUPSORT, DB_BTREE, dbflags, 0666);
   trackdb_scheduledb = open_db("schedule.db", 0, DB_HASH, dbflags, 0666);
-  if(!trackdb_existing_database) {
+  if(!trackdb_existing_database && !(flags & TRACKDB_READ_ONLY)) {
     /* Stash the database version */
     char buf[32];