1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

basic subdirectory support

This commit is contained in:
Michael
2023-08-06 21:39:39 +02:00
committed by GitHub
parent ad8695ac91
commit a9e895c08f
2 changed files with 5 additions and 1 deletions

View File

@ -85,6 +85,10 @@ bool CFilesystemLoader::createResource(std::string filename, bool update)
if (!update)
{
// create folders if not exists
boost::filesystem::path p((baseDirectory / filename).c_str());
boost::filesystem::create_directories(p.parent_path());
// create file, if not exists
std::ofstream file((baseDirectory / filename).c_str(), std::ofstream::binary);