mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-19 01:44:53 +00:00
qt: Create addons directory if it does not exist. (#1186)
This commit is contained in:
parent
3a36615da7
commit
3dea1a9f81
2 changed files with 9 additions and 3 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue