From 8bb32d464d23c54ace4ec519905c1e1a201c45e4 Mon Sep 17 00:00:00 2001 From: jpirnay Date: Thu, 9 Apr 2026 14:17:24 +0200 Subject: [PATCH] Avoid empty string issue --- src/util/ScreenshotUtil.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/ScreenshotUtil.cpp b/src/util/ScreenshotUtil.cpp index 0f14f506..67d16f00 100644 --- a/src/util/ScreenshotUtil.cpp +++ b/src/util/ScreenshotUtil.cpp @@ -47,7 +47,7 @@ bool ScreenshotUtil::saveFramebufferAsBmp(const char* filename, const uint8_t* f size_t last_slash = path.find_last_of('/'); if (last_slash != std::string::npos) { std::string dir = path.substr(0, last_slash); - if (!Storage.exists(dir.c_str())) { + if (!dir.empty() && !Storage.exists(dir.c_str())) { if (!Storage.mkdir(dir.c_str())) { return false; }