From 476993d5f2342c3b33a794cc0ae6eaf76aa5b3c4 Mon Sep 17 00:00:00 2001 From: Scighost Date: Sun, 29 Oct 2023 01:37:45 +0800 Subject: [PATCH] fix the issue when excute vacuum in database #468 --- src/Starward/Services/DatabaseService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Starward/Services/DatabaseService.cs b/src/Starward/Services/DatabaseService.cs index 49b7db41c..5aab15093 100644 --- a/src/Starward/Services/DatabaseService.cs +++ b/src/Starward/Services/DatabaseService.cs @@ -98,7 +98,7 @@ public DateTime BackupDatabase(string file) using var backupCon = new SqliteConnection($"DataSource={file};Pooling=False;"); backupCon.Open(); using var con = CreateConnection(); - con.Execute("VACUUM;"); + con.Execute("VACUUM;", commandType: CommandType.Text); con.BackupDatabase(backupCon); var time = DateTime.Now; SetValue("LastBackupDatabase", Path.GetFileName(file), time);