Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/ESP32_FTPClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,13 @@ void ESP32_FTPClient::OpenConnection() {
GetFTPAnswer();

FTPdbgn("Send USER");
client.print(F("USER "));
client.println(F(userName));
String userStr = "USER " + String(userName);
client.println(F(userStr.c_str()));
GetFTPAnswer();

FTPdbgn("Send PASSWORD");
client.print(F("PASS "));
client.println(F(passWord));
String passStr = "PASS " + String(passWord);
client.println(F(passStr.c_str()));
GetFTPAnswer();

FTPdbgn("Send SYST");
Expand All @@ -177,8 +177,8 @@ void ESP32_FTPClient::RenameFile(char* from, char* to) {
void ESP32_FTPClient::NewFile (const char* fileName) {
FTPdbgn("Send STOR");
if(!isConnected()) return;
client.print(F("STOR "));
client.println(F(fileName));
String storStr = "STOR " + String(fileName);
client.println(F(storStr.c_str()));
GetFTPAnswer();
}

Expand Down