File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,6 @@ constexpr auto DOWNLOAD_DIR = "download";
44
44
constexpr auto CAPTURES_DIR = " captures" ;
45
45
constexpr auto CHEATS_DIR = " cheats" ;
46
46
constexpr auto PATCHES_DIR = " patches" ;
47
- constexpr auto ADDONS_DIR = " addcont" ;
48
47
constexpr auto METADATA_DIR = " game_data" ;
49
48
50
49
// Filenames
Original file line number Diff line number Diff line change @@ -111,12 +111,19 @@ void GameInstallDialog::Save() {
111
111
return ;
112
112
}
113
113
114
- if (addonsDirectory.isEmpty () || !QDir (addonsDirectory).exists () ||
115
- !QDir::isAbsolutePath (addonsDirectory)) {
114
+ if (addonsDirectory.isEmpty () || !QDir::isAbsolutePath (addonsDirectory)) {
116
115
QMessageBox::critical (this , tr (" Error" ),
117
116
" The value for location to install DLC is not valid." );
118
117
return ;
119
118
}
119
+ QDir addonsDir (addonsDirectory);
120
+ if (!addonsDir.exists ()) {
121
+ if (!addonsDir.mkpath (" ." )) {
122
+ QMessageBox::critical (this , tr (" Error" ),
123
+ " The DLC install location could not be created." );
124
+ return ;
125
+ }
126
+ }
120
127
121
128
Config::setGameInstallDir (Common::FS::PathFromQString (gamesDirectory));
122
129
Config::setAddonInstallDir (Common::FS::PathFromQString (addonsDirectory));
You can’t perform that action at this time.
0 commit comments