@@ -79,7 +79,7 @@ fs::path SFTPUtils::get_remote_file_target(sftp_session sftp, const fs::path& so
79
79
target_full_path += source_path.filename ().u8string ().insert (0 , " /" );
80
80
target_attr = mp_sftp_stat (sftp, target_full_path.u8string ().c_str ());
81
81
if (target_attr && target_attr->type == SSH_FILEXFER_TYPE_DIRECTORY)
82
- throw SFTPError{" cannot overwrite remote directory {} with non-directory" , target_full_path};
82
+ throw SFTPError{" cannot overwrite remote directory {:? } with non-directory" , target_full_path};
83
83
84
84
return target_full_path;
85
85
}
@@ -136,10 +136,10 @@ fs::path SFTPUtils::get_remote_dir_target(sftp_session sftp, const fs::path& sou
136
136
auto child_path_string = child_path.u8string ();
137
137
auto child_info = mp_sftp_stat (sftp, child_path_string.c_str ());
138
138
if (child_info && child_info->type != SSH_FILEXFER_TYPE_DIRECTORY)
139
- throw SFTPError{" cannot overwrite remote non-directory {} with directory" , child_path};
139
+ throw SFTPError{" cannot overwrite remote non-directory {:? } with directory" , child_path};
140
140
141
141
if (!child_info && sftp_mkdir (sftp, child_path_string.c_str (), 0777 ) != SSH_FX_OK)
142
- throw SFTPError{" cannot create remote directory {}: {}" , child_path, ssh_get_error (sftp->session )};
142
+ throw SFTPError{" cannot create remote directory {:? }: {}" , child_path, ssh_get_error (sftp->session )};
143
143
144
144
return child_path;
145
145
}
@@ -154,9 +154,9 @@ void SFTPUtils::mkdir_recursive(sftp_session sftp, const fs::path& path)
154
154
for (const auto & partial_path : partial_paths)
155
155
if (auto attr = mp_sftp_lstat (sftp, partial_path.u8string ().c_str ());
156
156
attr && attr->type != SSH_FILEXFER_TYPE_DIRECTORY)
157
- throw SFTPError{" cannot overwrite remote non-directory {} with directory" , partial_path};
157
+ throw SFTPError{" cannot overwrite remote non-directory {:? } with directory" , partial_path};
158
158
else if (!attr && sftp_mkdir (sftp, partial_path.u8string ().c_str (), 0777 ) != SSH_FX_OK)
159
- throw SFTPError{" cannot create remote directory {}: {}" , partial_path, ssh_get_error (sftp->session )};
159
+ throw SFTPError{" cannot create remote directory {:? }: {}" , partial_path, ssh_get_error (sftp->session )};
160
160
}
161
161
162
162
std::unique_ptr<SFTPClient> SFTPUtils::make_SFTPClient (const std::string& host, int port, const std::string& username,
0 commit comments