Skip to content

Commit

Permalink
Filename always with leading slash (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
Aircoookie authored Oct 4, 2022
1 parent ebbfed3 commit b9349dc
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 16 deletions.
20 changes: 12 additions & 8 deletions library.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
{
"name":"ESP Async WebServer",
"name":"ESPAsyncWebServerAircoookie",
"description":"Asynchronous HTTP and WebSocket Server Library for ESP8266 and ESP32 (Aircoookie fork)",
"keywords":"http,async,websocket,webserver",
"authors":
{
"name": "Hristo Gochkov",
"maintainer": true
},
"authors": [
{
"name": "Hristo Gochkov"
},
{
"name": "Christian Schwinne",
"maintainer": true
}
],
"repository":
{
"type": "git",
"url": "https://github.com/me-no-dev/ESPAsyncWebServer.git"
"url": "https://github.com/Aircoookie/ESPAsyncWebServer.git"
},
"version": "2.0.6",
"version": "2.0.7",
"license": "LGPL-3.0",
"frameworks": "arduino",
"platforms": ["espressif8266", "espressif32"],
Expand Down
6 changes: 3 additions & 3 deletions library.properties
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name=ESP Async WebServer
version=2.0.6
version=2.0.7
author=Me-No-Dev
maintainer=Me-No-Dev
maintainer=Aircoookie
sentence=Async Web Server for ESP8266 and ESP31B (Aircoookie fork)
paragraph=Async Web Server for ESP8266 and ESP31B
category=Other
url=https://github.com/me-no-dev/ESPAsyncWebServer
url=https://github.com/Aircoookie/ESPAsyncWebServer
architectures=*
9 changes: 4 additions & 5 deletions src/SPIFFSEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -354,13 +354,12 @@ void SPIFFSEditor::handleRequest(AsyncWebServerRequest *request){
String fname = entry.name();
if (fname.indexOf("wsec") == -1) {
if (output != "[") output += ',';
output += "{\"type\":\"";
output += "file";
output += "\",\"name\":\"";
output += "{\"type\":\"file\",\"name\":\"";
if (fname[0] != '/') output += '/';
output += fname;
output += "\",\"size\":";
output += String(entry.size());
output += "}";
output += '}';
}
#ifdef ESP32
entry = dir.openNextFile();
Expand All @@ -371,7 +370,7 @@ void SPIFFSEditor::handleRequest(AsyncWebServerRequest *request){
#ifdef ESP32
dir.close();
#endif
output += "]";
output += ']';
request->send(200, "application/json", output);
output = String();
}
Expand Down

0 comments on commit b9349dc

Please sign in to comment.