Correctly create screenshot directory if it does not exist (#551)

This commit is contained in:
Tom Lally
2022-12-03 17:57:32 +01:00
committed by GitHub
parent b361b154d8
commit dd538d477c
+1 -1
View File
@@ -145,7 +145,7 @@ void Renderer::SaveScreenshot(const std::vector<uint8>& rgb_data, int width, int
{
fs::path screendir = _GenerateScreenshotFilename(!mainWindow);
if (!fs::exists(screendir.parent_path()))
fs::create_directory(screendir);
fs::create_directories(screendir.parent_path());
if (image.SaveFile(screendir.wstring()))
{
if(mainWindow)