Skip to content

Commit

Permalink
Merge pull request xreef#21 from cat-in-136/fix-list-filename
Browse files Browse the repository at this point in the history
Fix LIST file name in case of STORAGE_TYPE == STORAGE_SD
  • Loading branch information
xreef authored Jun 26, 2022
2 parents d960fd2 + c4e31ad commit 1bf9b33
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion FtpServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1408,7 +1408,10 @@ bool FtpServer::doList()
// data.print( F(",\t") );
// data.println( fileDir.name() );

generateFileLine(&data, false, fileDir.name(), long( fileDir.size()), "Jan 01 00:00", this->user);
String fn = fileDir.name();
fn.remove(0, fn.lastIndexOf("/")+1);

generateFileLine(&data, fileDir.isDirectory(), fn.c_str(), long( fileDir.size()), "Jan 01 00:00", this->user);

nbMatch ++;
return true;
Expand Down

0 comments on commit 1bf9b33

Please sign in to comment.