Fix temp file write
This commit is contained in:
@@ -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())) {
|
||||
|
||||
Reference in New Issue
Block a user