From 89ee88530e8e7f6fdca3fb7cb242dea5cf56452f Mon Sep 17 00:00:00 2001 From: anschrammh Date: Tue, 15 Dec 2020 00:12:33 +0100 Subject: [PATCH] Updated due to changes to the monthNumTo3LetterAbbreviation function's prototype --- src/app/FTPServer.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/FTPServer.h b/src/app/FTPServer.h index a4a96dd..e6547e4 100644 --- a/src/app/FTPServer.h +++ b/src/app/FTPServer.h @@ -844,11 +844,11 @@ class FTPServer : public TCPServer //We try to retrieve the last modification date const time_t fileModifDate = fileOrDir.getLastWrite(); struct tm *timeP = localtime(&fileModifDate); - //Buffer necessary to store the month's three letter abbreviation - char month[4] = ""; + //We get the month's three letter abbreviation + uint32_t monthAbbreviation = monthNumTo3LetterAbbreviation(timeP->tm_mon + 1); //+1 because in the tm struct, month goes from 0 to 11 ... #ifdef DEBUG_FTPS - Serial.printf("Filename : %s, %s %d %d %d:%d\n", fileOrDir.name(), monthNumTo3LetterAbbreviation(month, timeP->tm_mon), timeP->tm_mon, timeP->tm_mday, timeP->tm_hour, timeP->tm_min); + Serial.printf("Filename : %s, %s %d %d %d:%d\n", fileOrDir.name(), (char *)&monthAbbreviation, timeP->tm_mon, timeP->tm_mday, timeP->tm_hour, timeP->tm_min); #endif char zero_prepended[3][3] = {"","",""}; @@ -856,7 +856,7 @@ class FTPServer : public TCPServer client->_dataClient.printf("%crwxrwxrwx 1 owner esp8266 %d %s %s %s:%s %s\r\n", fileOrDir.isDirectory() ? 'd' : '-', fileOrDir.isDirectory() ? 0 : fileOrDir.size(), - monthNumTo3LetterAbbreviation(month, timeP->tm_mon + 1), //+1 because in the tm struct, month goes from 0 to 11 ... + (char *)&monthAbbreviation, dateTimeFormater(zero_prepended[0],timeP->tm_mday,'0'), dateTimeFormater(zero_prepended[1],!timeP->tm_hour ? 23 : timeP->tm_hour-1 ,'0'), dateTimeFormater(zero_prepended[2],timeP->tm_min,'0'),