Skip to content

Commit 401b2ce

Browse files
committed
fix: open database readonly
1 parent 801add3 commit 401b2ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/database/src/database.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ impl Database {
5858

5959
// We have to open with flags because the SQLITE_OPEN_CREATE flag with the default open causes the file to
6060
// be overwritten
61-
let flags = OpenFlags::SQLITE_OPEN_READ_WRITE | OpenFlags::SQLITE_OPEN_URI | OpenFlags::SQLITE_OPEN_NO_MUTEX;
61+
let flags = OpenFlags::SQLITE_OPEN_READ_ONLY | OpenFlags::SQLITE_OPEN_URI | OpenFlags::SQLITE_OPEN_NO_MUTEX;
6262
let conn = Connection::open_with_flags(path, flags)?;
6363
self.database = Some(conn);
6464

0 commit comments

Comments
 (0)