From 62247cecda7bf8d588f7f7135b59152c24151d74 Mon Sep 17 00:00:00 2001 From: Jan Date: Sat, 13 Mar 2021 10:25:37 +0100 Subject: [PATCH] Create directories for output fastfile for linker --- src/Linker/Linker.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Linker/Linker.cpp b/src/Linker/Linker.cpp index c2810445..99cfdb75 100644 --- a/src/Linker/Linker.cpp +++ b/src/Linker/Linker.cpp @@ -444,10 +444,13 @@ class Linker::Impl 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"); - std::ifstream stream(zoneFilePath); + fs::create_directories(zoneFolderPath); + + std::ofstream stream(zoneFilePath); if (!stream.is_open()) return false;