Skip to content

Commit c9d2f5c

Browse files
committed
feat: create dlc3 if it doesn't exist
Hopefully from 2nd launch onward it will be recognised as a path
1 parent 68a7a38 commit c9d2f5c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/Features/ConfigPlus.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,14 @@ static void SavePersistentSvars() {
5454
}
5555
}
5656

57+
ON_INIT {
58+
// Create 1 and 2 for mods that may not have them
59+
// This is egregiously hard-coded
60+
std::filesystem::create_directory(std::string(engine->GetGameDirectory()) + "/../portal2_dlc1");
61+
std::filesystem::create_directory(std::string(engine->GetGameDirectory()) + "/../portal2_dlc2");
62+
std::filesystem::create_directory(std::string(engine->GetGameDirectory()) + "/../portal2_dlc3");
63+
}
64+
5765
CON_COMMAND_F(sar_download_file, "sar_download_file <url> <filepath> [directory] - Downloads a file from a URL and saves it to a path relative to game directory (e.g. portal2)\nIf directory isn't specified or invalid, looks for and overwrites existing file or uses base game directory", FCVAR_DONTRECORD) {
5866
if (args.ArgC() < 3 || args.ArgC() > 5) {
5967
return console->Print(sar_download_file.ThisPtr()->m_pszHelpString);

0 commit comments

Comments
 (0)