Index: db.scm ================================================================== --- db.scm +++ db.scm @@ -279,13 +279,15 @@ (let* ((dbpath (db:dbfile-path )) ;; 0)) (dbexists (file-exists? dbpath)) (dbfexists (file-exists? (conc dbpath "/megatest.db"))) (tmpdb (db:open-megatest-db path: dbpath)) ;; lock-create-open dbpath db:initialize-main-db)) (mtdb (db:open-megatest-db)) + (mtdbpath (db:dbdat-get-path mtdb)) + (mtdbexists (file-exists? mtdbpath)) (refndb (db:open-megatest-db path: dbpath name: "megatest_ref.db")) - (write-access (file-write-access? dbpath))) - (BB> "db:open-db>> dbpath="dbpath" dbexists="dbexists" and write-access="write-access) + (write-access (file-write-access? mtdbpath))) + (BB> "db:open-db>> mtdbpath="mtdbpath" mtdbexists="mtdbexists" and write-access="write-access) (if (and dbexists (not write-access)) (begin (set! *db-write-access* #f) (dbr:dbstruct-read-only-set! dbstruct #t))) (dbr:dbstruct-mtdb-set! dbstruct mtdb) (dbr:dbstruct-tmpdb-set! dbstruct tmpdb)