diff --git a/SidebarGenerator.cpp b/SidebarGenerator.cpp index c935ff0..c50b7e3 100755 --- a/SidebarGenerator.cpp +++ b/SidebarGenerator.cpp @@ -18,6 +18,7 @@ #include "SidebarGenerator.h" #include "StandardPaths.h" +#include "AppEnv.h" #include #include #include @@ -40,11 +41,13 @@ QList SidebarGenerator::generateSidebarUrls(QList sidebarUrls) dir.setPath(StandardPaths::documentsLocation()); if (dir.exists()) { - sidebarUrls.append(QUrl::fromLocalFile(dir.absolutePath())); - if (dir.cd("Rockstar Games/GTA V")) - { - sidebarUrls << QUrl::fromLocalFile(dir.absolutePath()); - } + } + + bool gameFolderExists; + QString gameFolder = AppEnv::getGameFolder(&gameFolderExists); + if (gameFolderExists) + { + QUrl::fromLocalFile(gameFolder); } dir.setPath(StandardPaths::desktopLocation());