Make extension checks case-insensitive (#273)

## Summary

* Implement new `StringUtils::checkFileExtension` which does case
insensitive checking
* Move all checks over to this
This commit is contained in:
Dave Allie
2026-01-07 20:07:23 +10:00
committed by GitHub
parent 0cc2c64df2
commit 46fa186b82
7 changed files with 38 additions and 34 deletions

View File

@@ -582,7 +582,7 @@ void CalibreWirelessActivity::handleSendBook(const std::string& data) {
// Sanitize and create full path
currentFilename = "/" + StringUtils::sanitizeFilename(filename);
if (currentFilename.find(".epub") == std::string::npos) {
if (!StringUtils::checkFileExtension(currentFilename, ".epub")) {
currentFilename += ".epub";
}
currentFileSize = length;