Skip to content

Commit 7e6f1fa

Browse files
committed
[le_screenshot] fix directory creation
on windows, we cannot assume that directory has been immediately created - we must test for it after we did; only if that test fails, we know that we were not successful in creating that directory
1 parent 62f44b6 commit 7e6f1fa

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

modules/le_screenshot/le_screenshot.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,9 @@ static bool le_screenshot_record( le_screenshot_o* self, le_rendergraph_o* rg, l
231231
if ( !std::filesystem::exists( target_path ) ) {
232232
if ( std::filesystem::create_directories( target_path ) ) {
233233
logger.info( "Created screenshot output directory: '%s'", target_path.c_str() );
234-
} else {
234+
}
235+
236+
if ( !std::filesystem::exists( target_path ) ) {
235237
logger.error( "Could not create screenshot output directory: '%s'", target_path.c_str() );
236238
}
237239
}

0 commit comments

Comments
 (0)