mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-01-22 14:31:39 +00:00
qt: Create addons directory if it does not exist. (#1186)
This commit is contained in:
parent
f495425441
commit
c0e25fd0b0
|
@ -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 a new issue