From e41de25919555a029806c35802e70abe17ec3dc4 Mon Sep 17 00:00:00 2001 From: Gabriele Date: Mon, 15 Dec 2014 23:00:00 +0100 Subject: [PATCH] Open files with ".!qB" appended to the filename Filenames do not include ".!qB" in the file list, so the generated path could be wrong. --- src/properties/propertieswidget.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/properties/propertieswidget.cpp b/src/properties/propertieswidget.cpp index 39dc0fc2a..a0d091073 100644 --- a/src/properties/propertieswidget.cpp +++ b/src/properties/propertieswidget.cpp @@ -463,11 +463,14 @@ void PropertiesWidget::openFolder(const QModelIndex &index, bool containing_fold const QDir saveDir(h.save_path()); const QString filename = path_items.join("/"); - const QString file_path = fsutils::expandPath(saveDir.absoluteFilePath(filename)); - qDebug("Trying to open folder at %s", qPrintable(file_path)); // Flush data h.flush_cache(); + QString file_path = fsutils::expandPath(saveDir.absoluteFilePath(filename)); + if (QFile::exists(file_path + ".!qB")) + file_path += ".!qB"; + qDebug("Trying to open folder at %s", qPrintable(file_path)); + #ifdef Q_OS_WIN if (containing_folder) { // Syntax is: explorer /select, "C:\Folder1\Folder2\file_to_select"