@@ -294,8 +294,8 @@ uint8_t FtpServer::handleFTP() {
294294void FtpServer::clientConnected ()
295295{
296296 DEBUG_PRINTLN ( F (" Client connected!" ) );
297- client.print (F (" 220---" )); client.print (welcomeMessage); client.println (F (" ---" ));
298- client.println (F (" 220--- By Renzo Mischianti ---" ));
297+ client.print (F (" 220 --- " )); client.print (welcomeMessage); client.println (F (" ---" ));
298+ client.println (F (" 220 --- By Renzo Mischianti ---" ));
299299 client.print (F (" 220 -- Version " )); client.print (FTP_SERVER_VERSION); client.println (F (" --" ));
300300 iCL = 0 ;
301301 if (FtpServer::_callback) {
@@ -393,7 +393,7 @@ bool FtpServer::processCommand()
393393 //
394394 else if ( CommandIs ( " FEAT" ))
395395 {
396- client.println (F (" 211-Extensions suported :" ));
396+ client.println (F (" 211-Extensions supported :" ));
397397 client.println (F (" MLST type*;modify*;size*;" ) );
398398 client.println (F (" MLSD" ) );
399399 client.println (F (" MDTM" ) );
@@ -507,7 +507,7 @@ bool FtpServer::processCommand()
507507 if ( ParameterIs ( " S" )) {
508508 client.println (F (" 200 S Ok" ) );
509509 } else {
510- client.println (F (" 504 Only S(tream) is suported " ) );
510+ client.println (F (" 504 Only S(tream) is supported " ) );
511511 }
512512 }
513513 //
@@ -589,7 +589,7 @@ bool FtpServer::processCommand()
589589 // else if( ParameterIs( "R" ))
590590 // client.println(F("200 B Ok") );
591591 }else {
592- client.println (F (" 504 Only F(ile) is suported " ) );
592+ client.println (F (" 504 Only F(ile) is supported " ) );
593593 }
594594 }
595595 //
@@ -602,7 +602,7 @@ bool FtpServer::processCommand()
602602 } else if ( ParameterIs ( " I" )) {
603603 client.println (F (" 200 TYPE is now 8-bit binary" ) );
604604 } else {
605- client.println (F (" 504 Unknow TYPE" ) );
605+ client.println (F (" 504 Unknown TYPE" ) );
606606 }
607607 }
608608
@@ -712,8 +712,8 @@ bool FtpServer::processCommand()
712712 client.println (F (" 200 OK, UTF8 ON" ) );
713713 DEBUG_PRINTLN (F (" 200 OK, UTF8 ON" ) );
714714 } else {
715- client.println (F (" 504 Unknow OPTS" ) );
716- DEBUG_PRINTLN (F (" 504 Unknow OPTS" ) );
715+ client.println (F (" 504 Unknown OPTS" ) );
716+ DEBUG_PRINTLN (F (" 504 Unknown OPTS" ) );
717717 }
718718 }
719719 //
@@ -991,14 +991,14 @@ bool FtpServer::processCommand()
991991 }
992992 }
993993 else {
994- client.print ( F (" 500 Unknow SITE command " ) ); client.println ( parameter );
994+ client.print ( F (" 500 Unknown SITE command " ) ); client.println ( parameter );
995995 }
996996 }
997997 //
998998 // Unrecognized commands ...
999999 //
10001000 else
1001- client.println (F (" 500 Unknow command" ) );
1001+ client.println (F (" 500 Unknown command" ) );
10021002 return true ;
10031003}
10041004
@@ -1154,7 +1154,7 @@ bool FtpServer::doRetrieve()
11541154 bytesTransfered += nb;
11551155
11561156 if (FtpServer::_transferCallback) {
1157- FtpServer::_transferCallback (FTP_DOWNLOAD, getFileName (&file), bytesTransfered);
1157+ FtpServer::_transferCallback (FTP_DOWNLOAD, getFileName (&file). c_str () , bytesTransfered);
11581158 }
11591159
11601160// RoSchmi
@@ -1200,7 +1200,7 @@ bool FtpServer::doStore()
12001200
12011201 if (FtpServer::_transferCallback) {
12021202
1203- FtpServer::_transferCallback (FTP_UPLOAD, getFileName (&file), bytesTransfered);
1203+ FtpServer::_transferCallback (FTP_UPLOAD, getFileName (&file). c_str () , bytesTransfered);
12041204 }
12051205 }
12061206 if ( nb < 0 || rc == nb ) {
@@ -1725,7 +1725,7 @@ bool FtpServer::doMlsd()
17251725 dir.close ();
17261726#endif
17271727 data.stop ();
1728- DEBUG_PRINTLN (F (" All file readed !!" ));
1728+ DEBUG_PRINTLN (F (" All file read !!" ));
17291729 return false ;
17301730}
17311731
@@ -1738,7 +1738,7 @@ void FtpServer::closeTransfer()
17381738 DEBUG_PRINT ( bytesTransfered / deltaT ); DEBUG_PRINTLN ( F (" kbytes/s" ) );
17391739
17401740 if (FtpServer::_transferCallback) {
1741- FtpServer::_transferCallback (FTP_TRANSFER_STOP, getFileName (&file), bytesTransfered);
1741+ FtpServer::_transferCallback (FTP_TRANSFER_STOP, getFileName (&file). c_str () , bytesTransfered);
17421742 }
17431743
17441744
@@ -1758,7 +1758,7 @@ void FtpServer::abortTransfer()
17581758 if ( transferStage != FTP_Close )
17591759 {
17601760 if (FtpServer::_transferCallback) {
1761- FtpServer::_transferCallback (FTP_TRANSFER_ERROR, getFileName (&file), bytesTransfered);
1761+ FtpServer::_transferCallback (FTP_TRANSFER_ERROR, getFileName (&file). c_str () , bytesTransfered);
17621762 }
17631763
17641764 file.close ();
@@ -2095,8 +2095,8 @@ char * FtpServer::makeDateTimeStr( char * tstr, uint16_t date, uint16_t time )
20952095}
20962096
20972097
2098- uint32_t FtpServer::fileSize ( FTP_FILE file ) {
2099- #if (STORAGE_TYPE == STORAGE_SPIFFS || STORAGE_TYPE == STORAGE_LITTLEFS || STORAGE_TYPE == STORAGE_FFAT || STORAGE_TYPE == STORAGE_SD || STORAGE_TYPE == STORAGE_SD_MMC || STORAGE_TYPE == STORAGE_SEEED_SD)
2098+ uint32_t FtpServer::fileSize ( FTP_FILE & file ) {
2099+ #if (STORAGE_TYPE == STORAGE_SDFAT2 || STORAGE_TYPE == STORAGE_SPIFFS || STORAGE_TYPE == STORAGE_LITTLEFS || STORAGE_TYPE == STORAGE_FFAT || STORAGE_TYPE == STORAGE_SD || STORAGE_TYPE == STORAGE_SD_MMC || STORAGE_TYPE == STORAGE_SEEED_SD)
21002100 return file.size ();
21012101#else
21022102 return file.fileSize ();
@@ -2250,7 +2250,7 @@ bool FtpServer::isDir( char * path )
22502250// if (strcmp(path, "/") == 0) return true;
22512251// res = file.isDirectory();
22522252// DEBUG_PRINT(path);
2253- // DEBUG_PRINT(" IS DIRECOTORY --> ");
2253+ // DEBUG_PRINT(" IS DIRECTORY --> ");
22542254// DEBUG_PRINTLN(res);
22552255 return true ;
22562256#else
0 commit comments