Skip to content

Commit

Permalink
Upload filename - prepend / for root directory.
Browse files Browse the repository at this point in the history
Needed after IDF update to 4.x+

Need more testing for other file operations.
  • Loading branch information
amandel committed Aug 27, 2022
1 parent b5b62eb commit eea6ce2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/configServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1303,7 +1303,7 @@ void uploadTracks(HTTPResponse *res) {
File root = SDFileSystem.open("/");
File file = root.openNextFile();
while (file) {
const String fileName(file.name());
const String fileName(String("/") + file.name());
log_d("Upload file: %s", fileName.c_str());
if (!file.isDirectory()
&& fileName.endsWith(CSVFileWriter::EXTENSION)) {
Expand All @@ -1315,7 +1315,7 @@ void uploadTracks(HTTPResponse *res) {
if (res) {
res->print(friendlyFileName);
}
const boolean uploaded = uploader.upload((String("/") + file.name()));
const boolean uploaded = uploader.upload(fileName);
file.close();
if (uploaded) {
moveToUploaded(fileName);
Expand Down

0 comments on commit eea6ce2

Please sign in to comment.