Revert "fix: harden project database export"

This commit is contained in:
Laurent Trinques
2026-09-23 13:50:49 +02:00
committed by GitHub
parent ed0f800ab5
commit d889a384aa
3 changed files with 4 additions and 3 deletions
+2 -3
View File
@@ -1335,10 +1335,9 @@ void projectDataBase::exportDb(projectDataBase *db,
// VACUUM INTO creates a standalone copy of the current database without
// requiring access to the SQLite driver's native connection handle.
const auto escaped_path = path_.replace("'", "''");
QSqlQuery query(db->m_data_base);
query.prepare("VACUUM INTO ?");
query.bindValue(0, path_);
if (!query.exec()) {
if (!query.exec("VACUUM INTO '" % escaped_path % "'")) {
qWarning() << "Unable to export project database:" << query.lastError().text();
}
}