Create directories for output fastfile for linker

This commit is contained in:
Jan 2021-03-13 10:25:37 +01:00
parent a57201d78d
commit 62247cecda

View File

@ -444,10 +444,13 @@ class Linker::Impl
bool WriteZoneToFile(Zone* zone) bool WriteZoneToFile(Zone* zone)
{ {
fs::path zoneFilePath(m_args.GetOutputFolderPathForZone(zone->m_name)); const fs::path zoneFolderPath(m_args.GetOutputFolderPathForZone(zone->m_name));
auto zoneFilePath(zoneFolderPath);
zoneFilePath.append(zone->m_name + ".ff"); zoneFilePath.append(zone->m_name + ".ff");
std::ifstream stream(zoneFilePath); fs::create_directories(zoneFolderPath);
std::ofstream stream(zoneFilePath);
if (!stream.is_open()) if (!stream.is_open())
return false; return false;