Skip to content

Commit eea6ce2

Browse files
committed
Upload filename - prepend / for root directory.
Needed after IDF update to 4.x+ Need more testing for other file operations.
1 parent b5b62eb commit eea6ce2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/configServer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1303,7 +1303,7 @@ void uploadTracks(HTTPResponse *res) {
13031303
File root = SDFileSystem.open("/");
13041304
File file = root.openNextFile();
13051305
while (file) {
1306-
const String fileName(file.name());
1306+
const String fileName(String("/") + file.name());
13071307
log_d("Upload file: %s", fileName.c_str());
13081308
if (!file.isDirectory()
13091309
&& fileName.endsWith(CSVFileWriter::EXTENSION)) {
@@ -1315,7 +1315,7 @@ void uploadTracks(HTTPResponse *res) {
13151315
if (res) {
13161316
res->print(friendlyFileName);
13171317
}
1318-
const boolean uploaded = uploader.upload((String("/") + file.name()));
1318+
const boolean uploaded = uploader.upload(fileName);
13191319
file.close();
13201320
if (uploaded) {
13211321
moveToUploaded(fileName);

0 commit comments

Comments
 (0)