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:
Felix Geyer 2016-07-31 18:29:43 +02:00
parent fb57ed2bcd
commit e9c8363b70

View File

@ -295,7 +295,7 @@ bool DatabaseTabWidget::saveDatabase(Database* db)
DatabaseManagerStruct& dbStruct = m_dbList[db];
if (dbStruct.saveToFilename) {
QSaveFile saveFile(dbStruct.filePath);
QSaveFile saveFile(dbStruct.canonicalFilePath);
if (saveFile.open(QIODevice::WriteOnly)) {
m_writer.writeDatabase(&saveFile, db);
if (m_writer.hasError()) {