Skip to content

Commit 8de2b86

Browse files
committed
1 parent 5aeb17f commit 8de2b86

File tree

5 files changed

+10
-12
lines changed

5 files changed

+10
-12
lines changed

FtpServer.cpp

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -510,9 +510,6 @@ bool FtpServer::processCommand()
510510
DEBUG_PRINT( int( dataIp[0]) ); DEBUG_PRINT( F(".") ); DEBUG_PRINT( int( dataIp[1]) ); DEBUG_PRINT( F(".") );
511511
DEBUG_PRINT( int( dataIp[2]) ); DEBUG_PRINT( F(".") ); DEBUG_PRINTLN( int( dataIp[3]) );
512512

513-
DEBUG_PRINT( F(" IP 0.0.0.0: ") );
514-
DEBUG_PRINT(dataIp.toString());
515-
516513
#if !defined(ARDUINO_ARCH_RP2040) && ((FTP_SERVER_NETWORK_TYPE_SELECTED == NETWORK_ESP8266_ASYNC) || (FTP_SERVER_NETWORK_TYPE_SELECTED == NETWORK_ESP8266) || (FTP_SERVER_NETWORK_TYPE_SELECTED == NETWORK_ESP8266) || (FTP_SERVER_NETWORK_TYPE_SELECTED == NETWORK_ESP32)) // || (FTP_SERVER_NETWORK_TYPE_SELECTED == NETWORK_WiFiNINA) || (FTP_SERVER_NETWORK_TYPE_SELECTED == NETWORK_SEEED_RTL8720DN))
517514
if (dataIp.toString() == F("0.0.0.0")) {
518515
dataIp = NET_CLASS.softAPIP();
@@ -658,11 +655,11 @@ bool FtpServer::processCommand()
658655
else if( CommandIs( "MLST" ))
659656
{
660657
char path[ FTP_CWD_SIZE ];
661-
uint16_t dat, tim;
658+
uint16_t dat=0, tim=0;
662659
char dtStr[ 15 ];
663660
bool isdir;
664661
if( haveParameter() && makeExistsPath( path )){
665-
if( ! getFileModTime( path, & dat, & tim )) {
662+
if( ! getFileModTime( path, &dat, &tim )) {
666663
client.print( F("550 Unable to retrieve time for ") ); client.println( parameter );
667664
} else
668665
{
@@ -933,9 +930,9 @@ bool FtpServer::processCommand()
933930
}
934931
else if( mdtm ) // get file modification time
935932
{
936-
uint16_t dat, tim;
933+
uint16_t dat=0, tim=0;
937934
char dtStr[ 15 ];
938-
if( getFileModTime( path, & dat, & tim )) {
935+
if( getFileModTime( path, &dat, &tim )) {
939936
client.print( F("213 ") ); client.println( makeDateTimeStr( dtStr, dat, tim ) );
940937
} else {
941938
client.println("550 Unable to retrieve time" );
@@ -2302,15 +2299,15 @@ bool FtpServer::getFileModTime( uint16_t * pdate, uint16_t * ptime )
23022299
#else
23032300
return dir.getLastWrite();
23042301
#endif
2305-
#elif STORAGE_TYPE == STORAGE_SDFAT1 || STORAGE_TYPE == STORAGE_SPIFM
2302+
#elif STORAGE_TYPE == STORAGE_SDFAT1
23062303
dir_t d;
23072304

23082305
if( ! file.dirEntry( & d ))
23092306
return false;
23102307
* pdate = d.lastWriteDate;
23112308
* ptime = d.lastWriteTime;
23122309
return true;
2313-
#elif STORAGE_TYPE == STORAGE_SDFAT2
2310+
#elif STORAGE_TYPE == STORAGE_SDFAT2 || STORAGE_TYPE == STORAGE_SPIFM
23142311
return file.getModifyDateTime( pdate, ptime );
23152312
#endif
23162313
return false;

FtpServer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#ifndef FTP_SERVER_H
2121
#define FTP_SERVER_H
2222

23-
#define FTP_SERVER_VERSION "2.1.4 (2022-09-20)"
23+
#define FTP_SERVER_VERSION "2.1.5 (2023-01-13)"
2424

2525
#if ARDUINO >= 100
2626
#include "Arduino.h"

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
- Wio Terminal (SdFat 2, Seed SD, and native FAT)
1313

1414
#### Changelog
15+
- 2022-01-13 2.1.5 Fix SPIFM external SPI Flash date management
1516
- 2022-09-21 2.1.4 Add support for Raspberry Pi Pico W and rp2040 boards, Fix SD card config
1617
- 2022-09-20 2.1.3 Soft AP IP management, more disconnect event and SD_MCC
1718
- 2022-05-21 2.1.2 Fix SD path (#19)

library.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@
1616
},
1717
"url": "https://www.mischianti.org",
1818
"frameworks": "Arduino",
19-
"version": "2.1.4",
19+
"version": "2.1.5",
2020
"platforms": "*"
2121
}

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=SimpleFTPServer
2-
version=2.1.4
2+
version=2.1.5
33
author=Renzo Mischianti <renzo.mischianti@gmail.com>
44
maintainer=Renzo Mischianti <renzo.mischianti@gmail.com>
55
sentence=Simple FTP server for esp8266, esp32, STM32, Raspberry Pi Pico and Arduino

0 commit comments

Comments
 (0)