Skip to content

Commit

Permalink
use rootPath in place of displayName for drives
Browse files Browse the repository at this point in the history
  • Loading branch information
sithlord48 committed Mar 7, 2023
1 parent a387df1 commit c1821f7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/dialogs/bcdialog.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/****************************************************************************/
// copyright 2020 Chris Rizzitello <sithlord48@gmail.com> //
// copyright 2020 - 2023 Chris Rizzitello <sithlord48@gmail.com> //
// //
// This file is part of Black Chocobo. //
// //
Expand Down Expand Up @@ -286,8 +286,8 @@ QFileDialog* BCDialog::getFileDialog(QWidget *parent, const QString &title, cons
const auto drives = QStorageInfo::mountedVolumes().toList();
for (const auto &drive : drives) {
bool chksubs = QFile::exists("/.flatpak-info") ? drive.subvolume().isEmpty() : true;
if (drive.fileSystemType() != "tmpfs" && drive.displayName() != "/boot" && drive.displayName() != "/home" && drive.isValid() && chksubs)
sideBarUrls.append(QUrl::fromLocalFile(drive.displayName()));
if (drive.fileSystemType() != "tmpfs" && drive.displayName() != "/boot" && drive.rootPath() != "/home" && drive.isValid() && chksubs)
sideBarUrls.append(QUrl::fromLocalFile(drive.rootPath()));
}
#else
const QFileInfoList drives = QDir::drives();
Expand Down
2 changes: 1 addition & 1 deletion src/dialogs/bcdialog.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/****************************************************************************/
// copyright 2022 Chris Rizzitello <sithlord48@gmail.com> //
// copyright 2022 - 2023 Chris Rizzitello <sithlord48@gmail.com> //
// //
// This file is part of Black Chocobo. //
// //
Expand Down

0 comments on commit c1821f7

Please sign in to comment.