This is a nice-to-have.
Checking for current dir more explicitly will allow to add dot-starting files to the image. In the linux world these use to have settings and alike, so they can be used to store configuration in SPIFFS (like SPIFFS image version, for instance). The common webserver setup can then ignore these by
server.onNotFound([]() {
// Hidden files
if (server.uri().startsWith("/.")) {
server.send(403, "text/plain", "Forbidden");
return;
}
// Existing files in SPIFFS
if (!handleFileRead(server.uri())) {
server.send(404, "text/plain", "NotFound");
return;
}
});
This is a nice-to-have. Checking for current dir more explicitly will allow to add dot-starting files to the image. In the linux world these use to have settings and alike, so they can be used to store configuration in SPIFFS (like SPIFFS image version, for instance). The common webserver setup can then ignore these by