BUG: boundaryDataTemplates - make dir before writing to stream. Fixes #390

This commit is contained in:
Andrew Heather
2017-01-23 08:41:43 +00:00
parent 2c388220aa
commit 77a3022c43

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. \\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -114,8 +114,9 @@ Foam::fileName Foam::boundaryDataSurfaceWriter::writeTemplate
// Write field // Write field
{ {
fileName valsFile(baseDir/timeName/fieldName); fileName valsDir(baseDir/timeName);
OFstream os(valsFile); mkDir(valsDir);
OFstream os(valsDir/fieldName);
os << values; os << values;
} }