Skip to content

Commit 0dc8300

Browse files
authored
Merge pull request #832 from LeeLeahy2/file-limit
WebSockets: Remove limit on number of files displayed
2 parents ad9e10e + b7082b0 commit 0dc8300

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

Firmware/RTK_Everywhere/WebServer.ino

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -136,18 +136,6 @@ void getFileList(String &returnText)
136136
String fileSize;
137137
stringHumanReadableSize(fileSize, file.fileSize());
138138
returnText += "fmName," + String(fileName) + ",fmSize," + fileSize + ",";
139-
140-
const int maxFiles = 20; //40 is too much
141-
const int fileNameLength = 50;
142-
const int maxStringLength = maxFiles * fileNameLength;
143-
// It is not uncommon to have SD cards with 100+ files on them. String can get huge.
144-
// Here we arbitrarily limit it.
145-
// This could be larger but, left unchecked, it will absolutely explode the stack.
146-
if(returnText.length() > maxStringLength)
147-
{
148-
systemPrintf("Limiting file list to %d characters\r\n", maxStringLength);
149-
break;
150-
}
151139
}
152140
}
153141

0 commit comments

Comments
 (0)