diff --git a/index.html b/index.html
index f1adbab..b345ee6 100644
--- a/index.html
+++ b/index.html
@@ -312,7 +312,7 @@
Select USB Host Folder
Board: |
- |
+ |
Version: |
diff --git a/js/common/web-file-transfer.js b/js/common/web-file-transfer.js
index 30cd879..cfedb9d 100644
--- a/js/common/web-file-transfer.js
+++ b/js/common/web-file-transfer.js
@@ -131,12 +131,16 @@ class FileTransferClient {
const response = await this._fetch(`/fs${path}`, {headers: {"Accept": "application/json"}});
const results = await response.json();
- for (let result of results) {
+ let listings = results
+ if (results.files !== undefined) {
+ listings = results.files;
+ }
+ for (let listing of listings) {
contents.push({
- path: result.name,
- isDir: result.directory,
- fileSize: result.file_size,
- fileDate: Number(result.modified_ns / 1000000),
+ path: listing.name,
+ isDir: listing.directory,
+ fileSize: listing.file_size,
+ fileDate: Number(listing.modified_ns / 1000000),
});
}