diff options
| author | luigi1111 <luigi1111w@gmail.com> | 2020-08-14 14:16:19 -0500 |
|---|---|---|
| committer | luigi1111 <luigi1111w@gmail.com> | 2020-08-14 14:16:19 -0500 |
| commit | e65159163d91a4d5f5f0159c989108880e652670 (patch) | |
| tree | 9a9782e0fd6a62a2205ee4ca2fb096b27a2567d5 /src | |
| parent | 77b7a5244ab1bc455fed057f65ac1fdf7429b05e (diff) | |
| parent | 6898d5dd428799a44a531dbbc5a44880a89bdf5b (diff) | |
| download | monzero-gui-e65159163d91a4d5f5f0159c989108880e652670.tar.gz monzero-gui-e65159163d91a4d5f5f0159c989108880e652670.tar.xz monzero-gui-e65159163d91a4d5f5f0159c989108880e652670.zip | |
Merge pull request #3038
6898d5d oshelper: always convert to canonical path in openContainingFolder (xiphon)
Diffstat (limited to 'src')
| -rw-r--r-- | src/main/oshelper.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main/oshelper.cpp b/src/main/oshelper.cpp index c4923f35..2d4a9d0f 100644 --- a/src/main/oshelper.cpp +++ b/src/main/oshelper.cpp @@ -92,22 +92,23 @@ QString OSHelper::downloadLocation() const bool OSHelper::openContainingFolder(const QString &filePath) const { + QString canonicalFilePath = QFileInfo(filePath).canonicalFilePath(); #if defined(Q_OS_WIN) - if (openFolderAndSelectItem(QDir::toNativeSeparators(filePath))) + if (openFolderAndSelectItem(QDir::toNativeSeparators(canonicalFilePath))) { return true; } #elif defined(Q_OS_MAC) - if (MacOSHelper::openFolderAndSelectItem(QUrl::fromLocalFile(filePath))) + if (MacOSHelper::openFolderAndSelectItem(QUrl::fromLocalFile(canonicalFilePath))) { return true; } #endif - QUrl url = QUrl::fromLocalFile(QFileInfo(filePath).absolutePath()); + QUrl url = QUrl::fromLocalFile(canonicalFilePath); if (!url.isValid()) { - qWarning() << "Malformed file path" << filePath << url.errorString(); + qWarning() << "Malformed file path" << canonicalFilePath << url.errorString(); return false; } return QDesktopServices::openUrl(url); |
