Skip to content

Commit

Permalink
msvc fixup
Browse files Browse the repository at this point in the history
Signed-off-by: Julian Oes <[email protected]>
  • Loading branch information
julianoes committed Sep 5, 2023
1 parent 4b0cafc commit 32cfb02
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/mavsdk/core/mavlink_ftp_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,9 @@ bool MavlinkFtpClient::upload_start(Work& work, UploadItem& item)
work.payload.opcode = work.last_opcode;
work.payload.offset = 0;
strncpy(
reinterpret_cast<char*>(work.payload.data), remote_file_path.c_str(), max_data_length - 1);
reinterpret_cast<char*>(work.payload.data),
remote_file_path.string().c_str(),
max_data_length - 1);
work.payload.size = remote_file_path.string().size() + 1;

start_timer();
Expand Down
2 changes: 1 addition & 1 deletion src/mavsdk/core/mavlink_ftp_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ MavlinkFtpServer::_path_from_string(const std::string& payload_path)
void MavlinkFtpServer::set_root_directory(const std::string& root_dir)
{
std::error_code ignored;
_root_dir = fs::canonical(fs::path(root_dir), ignored);
_root_dir = fs::canonical(fs::path(root_dir), ignored).string();
}

void MavlinkFtpServer::_work_list(const PayloadHeader& payload, PayloadHeader& response)
Expand Down

0 comments on commit 32cfb02

Please sign in to comment.