Skip to content

Commit

Permalink
Fix ESP32 rename on SD (thanks @scuba-hacker) #44
Browse files Browse the repository at this point in the history
  • Loading branch information
xreef committed Oct 17, 2023
1 parent 627a968 commit 1eb85f7
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions FtpServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1630,7 +1630,7 @@ bool FtpServer::doMlsd()
DEBUG_PRINTLN("DIR NEXT ");
char dtStr[ 15 ];

struct tm * timeinfo;
// struct tm * timeinfo;

strcpy(dtStr, "19700101000000");

Expand Down Expand Up @@ -2315,7 +2315,7 @@ bool FtpServer::getFileModTime( uint16_t * pdate, uint16_t * ptime )
}
#endif

#if STORAGE_TYPE == STORAGE_SD || STORAGE_TYPE == STORAGE_SD_MMC
#if (STORAGE_TYPE == STORAGE_SD || STORAGE_TYPE == STORAGE_SD_MMC) && !defined(ESP32)
bool FtpServer::rename( const char * path, const char * newpath ){

FTP_FILE myFileIn = STORAGE_MANAGER.open(path, FILE_READ);
Expand Down
4 changes: 2 additions & 2 deletions FtpServer.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#ifndef FTP_SERVER_H
#define FTP_SERVER_H

#define FTP_SERVER_VERSION "2.1.6 (2023-02-02)"
#define FTP_SERVER_VERSION "2.1.7 (2023-10-17)"

#if ARDUINO >= 100
#include "Arduino.h"
Expand Down Expand Up @@ -627,7 +627,7 @@ class FtpServer
bool removeDir( const char * path ) { return STORAGE_MANAGER.rmdir( path ); };
#endif

#if STORAGE_TYPE == STORAGE_SD || STORAGE_TYPE == STORAGE_SD_MMC
#if (STORAGE_TYPE == STORAGE_SD || STORAGE_TYPE == STORAGE_SD_MMC) && !defined(ESP32)
bool rename( const char * path, const char * newpath );
#else
bool rename( const char * path, const char * newpath ) { return STORAGE_MANAGER.rename( path, newpath ); };
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@
- Wio Terminal (SdFat 2, Seed SD, and native FAT)

#### Changelog
- 2022-02-02 2.1.6 Fix esp8266 Ethernet (w5x00) issue and explain solution for ESP32 Ethernet (w5x00), add new Networks management
- 2022-01-13 2.1.5 Fix SPIFM external SPI Flash date management (add SPIFM esp32 example)
- 2023-10-07 2.1.7 Fix ESP32 rename on SD (thanks @scuba-hacker) #44
- 2023-02-02 2.1.6 Fix esp8266 Ethernet (w5x00) issue and explain solution for ESP32 Ethernet (w5x00), add new Networks management
- 2023-01-13 2.1.5 Fix SPIFM external SPI Flash date management (add SPIFM esp32 example)
- 2022-09-21 2.1.4 Add support for Raspberry Pi Pico W and rp2040 boards, Fix SD card config
- 2022-09-20 2.1.3 Soft AP IP management, more disconnect event and SD_MCC
- 2022-05-21 2.1.2 Fix SD path (#19)
Expand Down
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
},
"url": "https://www.mischianti.org",
"frameworks": "Arduino",
"version": "2.1.6",
"version": "2.1.7",
"platforms": "*"
}
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=SimpleFTPServer
version=2.1.6
version=2.1.7
author=Renzo Mischianti <[email protected]>
maintainer=Renzo Mischianti <[email protected]>
sentence=Simple FTP server for esp8266, esp32, STM32, Raspberry Pi Pico and Arduino
Expand Down

0 comments on commit 1eb85f7

Please sign in to comment.