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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user