Skip to content

Commit

Permalink
Make .png output directory if it doesn't exist (#1247)
Browse files Browse the repository at this point in the history
The `TestUtils::WritePNG` function silently fails if the given .png
file's directory does not exist. This change creates the directory if it
does not exist, yet, so opening the .png for write succeeds.
  • Loading branch information
docEdub committed Jun 23, 2023
1 parent 9ec4ba9 commit 1a96213
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 0 additions & 2 deletions .github/jobs/win32.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ jobs:
- script: |
cd build${{ variables.solutionName }}\Apps\Playground
mkdir Errors
mkdir Results
cd RelWithDebInfo
Playground app:///Scripts/validation_native.js
displayName: 'Validation Tests'
Expand Down
2 changes: 2 additions & 0 deletions Plugins/TestUtils/Source/TestUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ namespace Babylon::Plugins::Internal
bx::MemoryBlock mb(&allocator);
bx::FileWriter writer;
bx::FilePath filepath(filename.c_str());
bx::FilePath filedir(filepath.getPath());
bx::makeAll(filedir);
bx::Error err;
if (writer.open(filepath, false, &err))
{
Expand Down

0 comments on commit 1a96213

Please sign in to comment.