Make sections directory if it does not exist

This commit is contained in:
Dave Allie 2025-12-30 15:58:34 +11:00
parent 4fa5772572
commit d608fb9848
No known key found for this signature in database
GPG Key ID: F2FDDB3AD8D0276F

View File

@ -115,6 +115,12 @@ bool Section::createSectionFile(const int fontId, const float lineCompression, c
const auto localPath = epub->getSpineItem(spineIndex).href; const auto localPath = epub->getSpineItem(spineIndex).href;
const auto tmpHtmlPath = epub->getCachePath() + "/.tmp_" + std::to_string(spineIndex) + ".html"; const auto tmpHtmlPath = epub->getCachePath() + "/.tmp_" + std::to_string(spineIndex) + ".html";
// Create cache directory if it doesn't exist
{
const auto sectionsDir = epub->getCachePath() + "/sections";
SdMan.mkdir(sectionsDir.c_str());
}
// Retry logic for SD card timing issues // Retry logic for SD card timing issues
bool success = false; bool success = false;
uint32_t fileSize = 0; uint32_t fileSize = 0;