mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2024-11-26 20:50:40 +00:00
qt: Create addons directory if it does not exist. (#1186)
This commit is contained in:
parent
3a36615da7
commit
3dea1a9f81
@ -44,7 +44,6 @@ constexpr auto DOWNLOAD_DIR = "download";
|
||||
constexpr auto CAPTURES_DIR = "captures";
|
||||
constexpr auto CHEATS_DIR = "cheats";
|
||||
constexpr auto PATCHES_DIR = "patches";
|
||||
constexpr auto ADDONS_DIR = "addcont";
|
||||
constexpr auto METADATA_DIR = "game_data";
|
||||
|
||||
// Filenames
|
||||
|
@ -111,12 +111,19 @@ void GameInstallDialog::Save() {
|
||||
return;
|
||||
}
|
||||
|
||||
if (addonsDirectory.isEmpty() || !QDir(addonsDirectory).exists() ||
|
||||
!QDir::isAbsolutePath(addonsDirectory)) {
|
||||
if (addonsDirectory.isEmpty() || !QDir::isAbsolutePath(addonsDirectory)) {
|
||||
QMessageBox::critical(this, tr("Error"),
|
||||
"The value for location to install DLC is not valid.");
|
||||
return;
|
||||
}
|
||||
QDir addonsDir(addonsDirectory);
|
||||
if (!addonsDir.exists()) {
|
||||
if (!addonsDir.mkpath(".")) {
|
||||
QMessageBox::critical(this, tr("Error"),
|
||||
"The DLC install location could not be created.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Config::setGameInstallDir(Common::FS::PathFromQString(gamesDirectory));
|
||||
Config::setAddonInstallDir(Common::FS::PathFromQString(addonsDirectory));
|
||||
|
Loading…
Reference in New Issue
Block a user