xreef/SimpleFTPServer

PlatformIO ESP32 compilation error

DjordjeMandic opened this issue · 1 comments

I kept getting error that File was not defined. Actual File is inside fs namespace and it was not accessible. This fixed it

#ifdef ESP32
	#if ESP_ARDUINO_VERSION_MAJOR >= 2
			#include "FS.h"
			#include "LittleFS.h"
			#define STORAGE_MANAGER LittleFS
			
			using namespace fs;
			
	#else
			#include "LITTLEFS.h"
			#define STORAGE_MANAGER LITTLEFS
	#endif
#else

SimpleFTPServer/FtpServer.h

Lines 319 to 328 in 9f36a4a

#ifdef ESP32
#if ESP_ARDUINO_VERSION_MAJOR >= 2
#include "FS.h"
#include "LittleFS.h"
#define STORAGE_MANAGER LittleFS
#else
#include "LITTLEFS.h"
#define STORAGE_MANAGER LITTLEFS
#endif
#else

xreef commented

Hi DjordjeMandic,
I tested It without any change, and it works properly. Try the example provided.
Bye Renzo