Commit 35972ea6 authored by Huff, Israel's avatar Huff, Israel
Browse files

fixed bug in write method

parent 3d94b5c0
......@@ -236,9 +236,10 @@ bool SFTPFile::isOpen() { return (p->file != nullptr); }
// on error, returns < 0 and ssh and sftp session errors are set
ssize_t SFTPFile::write(QString str)
{
const char* buf = str.toStdString().c_str();
size_t count = strlen(buf);
ssize_t nwritten = sftp_write(p->file, buf, count);
std::string stdStr = str.toStdString();
const char* buf = stdStr.c_str();
size_t count = strlen(buf);
ssize_t nwritten = sftp_write(p->file, buf, count);
return nwritten;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment