diff options
| author | KunoiSayami <[email protected]> | 2022-01-16 22:25:55 +0800 |
|---|---|---|
| committer | KunoiSayami <[email protected]> | 2022-01-16 22:25:55 +0800 |
| commit | d477e234d03bb55234c2ca40d6ff61e88754ad94 (patch) | |
| tree | c33a206ada946d9f2241fa0740d8fc6914536840 /src/main.rs | |
| parent | 7662f028360370f0e4f3bd3770965e39c1458ae1 (diff) | |
feat: Add immutable option make sure sqlite file readonlyv4.0.0-beta
* chore: Bump version
Signed-off-by: KunoiSayami <[email protected]>
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs index 784837b..74d5a21 100644 --- a/src/main.rs +++ b/src/main.rs @@ -135,6 +135,7 @@ async fn cmd_authenticate_cookie(matches: &ArgMatches<'_>, cfg: Config) -> Resul if !repo.is_empty() && !conn.exists(&redis_key).await? { let sql_conn = SqliteConnectOptions::from_str(cfg.get_database_location())? .read_only(true) + .immutable(true) .disable_statement_logging() .connect() .await; @@ -378,6 +379,7 @@ async fn cmd_upgrade_database(cfg: Config) -> Result<()> { let mut origin_conn = SqliteConnectOptions::from_str(v2_path.as_path().to_str().unwrap())? .read_only(true) + .immutable(true) .connect() .await?; @@ -529,6 +531,7 @@ async fn cmd_list_repos_acl(arg_matches: &ArgMatches<'_>, cfg: Config) -> Result let mut conn = SqliteConnectOptions::from_str(cfg.get_database_location())? .read_only(true) + .immutable(true) .connect() .await?; |
