mirror of
https://github.com/chris2511/xca.git
synced 2026-09-14 11:06:19 +05:00
When overwriting an index.txt file, truncate it.
This commit is contained in:
parent
cd118e4e72
commit
e95198e775
@ -761,7 +761,7 @@ void db_x509::store(QModelIndexList list)
|
||||
void db_x509::writeIndex(const QString fname, QList<pki_x509*> items)
|
||||
{
|
||||
QFile file(fname);
|
||||
file.open(QFile::ReadWrite);
|
||||
file.open(QFile::ReadWrite | QFile::Truncate);
|
||||
if (file.error()) {
|
||||
throw errorEx(tr("Error opening file: '%1': %2")
|
||||
.arg(fname).arg(strerror(errno)));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user