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:
@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user