mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-01-29 15:53:38 -05:00
Save to canonical file path so we don't overwrite symlinks.
When saving a database we previously replaced symlinks with a regular file. Closes #442
This commit is contained in:
parent
fb57ed2bcd
commit
e9c8363b70
@ -295,7 +295,7 @@ bool DatabaseTabWidget::saveDatabase(Database* db)
|
|||||||
DatabaseManagerStruct& dbStruct = m_dbList[db];
|
DatabaseManagerStruct& dbStruct = m_dbList[db];
|
||||||
|
|
||||||
if (dbStruct.saveToFilename) {
|
if (dbStruct.saveToFilename) {
|
||||||
QSaveFile saveFile(dbStruct.filePath);
|
QSaveFile saveFile(dbStruct.canonicalFilePath);
|
||||||
if (saveFile.open(QIODevice::WriteOnly)) {
|
if (saveFile.open(QIODevice::WriteOnly)) {
|
||||||
m_writer.writeDatabase(&saveFile, db);
|
m_writer.writeDatabase(&saveFile, db);
|
||||||
if (m_writer.hasError()) {
|
if (m_writer.hasError()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user