mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-21 05:43:32 -07:00
Open files with ".!qB" appended to the filename
Filenames do not include ".!qB" in the file list, so the generated path could be wrong.
This commit is contained in:
parent
301294fbff
commit
e41de25919
1 changed files with 5 additions and 2 deletions
|
@ -463,11 +463,14 @@ void PropertiesWidget::openFolder(const QModelIndex &index, bool containing_fold
|
||||||
|
|
||||||
const QDir saveDir(h.save_path());
|
const QDir saveDir(h.save_path());
|
||||||
const QString filename = path_items.join("/");
|
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
|
// Flush data
|
||||||
h.flush_cache();
|
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
|
#ifdef Q_OS_WIN
|
||||||
if (containing_folder) {
|
if (containing_folder) {
|
||||||
// Syntax is: explorer /select, "C:\Folder1\Folder2\file_to_select"
|
// Syntax is: explorer /select, "C:\Folder1\Folder2\file_to_select"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue