mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-09-27 20:44:13 +02:00
Revert "fix: harden project database export"
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user