Fix temp file write

This commit is contained in:
jpirnay
2026-04-07 22:46:16 +02:00
parent 54034f3af2
commit d975546e30
+1 -1
View File
@@ -45,7 +45,7 @@ bool ScreenshotUtil::saveFramebufferAsBmp(const char* filename, const uint8_t* f
std::string path(filename);
size_t last_slash = path.find_last_of('/');
if (last_slash != std::string::npos) {
if (last_slash != std::string::npos && last_slash > 0) {
std::string dir = path.substr(0, last_slash);
if (!Storage.exists(dir.c_str())) {
if (!Storage.mkdir(dir.c_str())) {