Skip to content

Commit

Permalink
fix: open file in read only mode
Browse files Browse the repository at this point in the history
  • Loading branch information
frectonz committed Jun 16, 2024
1 parent cf763b0 commit 37ba292
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ struct TheDB {

impl TheDB {
async fn open(path: String) -> color_eyre::Result<Self> {
let conn = Connection::open_with_flags(&path, OpenFlags::SQLITE_OPEN_READ_WRITE).await?;
let conn = Connection::open_with_flags(&path, OpenFlags::SQLITE_OPEN_READ_ONLY).await?;

// This is meant to test if the file at path is actually a DB.
let tables = conn
Expand Down

0 comments on commit 37ba292

Please sign in to comment.