This commit is contained in:
Fabian Schlenz 2019-09-03 06:07:07 +02:00
commit 88655b543d

View File

@ -418,26 +418,7 @@ boolean FtpServer::processCommand()
File file = root.openNextFile();
while(file){
if (parameters && strcmp(parameters, "-la")==0) {
data.printf("%s %13d Jan 01 00:00 %s\r\n", file.isDirectory() ? "drwxr-xr-x 1 owner group" : "-rw-r--r-- 1 owner group", file.size(), file.name());
} else {
if(file.isDirectory()){
data.println( "+r,s <DIR> " + String(file.name()));
// Serial.print(" DIR : ");
// Serial.println(file.name());
// if(levels){
// listDir(fs, file.name(), levels -1);
// }
} else {
String fn, fs;
fn = file.name();
// fn.remove(0, 1);
fs = String(file.size());
data.println( "+r,s" + fs);
data.println( ",\t" + fn );
nm ++;
}
}
data.printf("%s %13d Jan 01 00:00 %s\r\n", file.isDirectory() ? "drwxr-xr-x 1 owner group" : "-rw-r--r-- 1 owner group", file.size(), file.name());
file = root.openNextFile();
}
client.println( "226 " + String(nm) + " matches total");