mirror of
https://github.com/86Box/86Box.git
synced 2026-02-22 01:25:33 -07:00
Make sure to properly open VM folders
This commit is contained in:
@@ -64,7 +64,11 @@ VMManagerMain::VMManagerMain(QWidget *parent) :
|
||||
contextMenu.addAction(&openSystemFolderAction);
|
||||
connect(&openSystemFolderAction, &QAction::triggered, [this, indexAt] {
|
||||
if (const auto configDir = indexAt.data(VMManagerModel::Roles::ConfigDir).toString(); !configDir.isEmpty()) {
|
||||
QDesktopServices::openUrl(QUrl(QString("file:///") + configDir));
|
||||
QDir dir(configDir);
|
||||
if (!dir.exists())
|
||||
dir.mkpath(".");
|
||||
|
||||
QDesktopServices::openUrl(QUrl(QString("file:///") + dir.canonicalPath()));
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user