mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-12-10 13:48:40 +00:00
qt: Create addons directory if it does not exist. (#1186)
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user