diff options
author | Hans Nilsson <[email protected]> | 2015-06-30 13:22:07 +0200 |
---|---|---|
committer | Hans Nilsson <[email protected]> | 2015-06-30 13:22:07 +0200 |
commit | 2e36a5f144ff1c996f02d5a55b07f3c840869ebf (patch) | |
tree | 97e92c53cd9dc0ca009538485d5fabb6e04c3c7b /lib/ssh/src | |
parent | 3f95bd6b63d4ee585fc3dcc53cd0f214e33762b3 (diff) | |
parent | 747e32d7e5cfcd580da0a57e94cf9fda7adfb6e3 (diff) | |
download | otp-2e36a5f144ff1c996f02d5a55b07f3c840869ebf.tar.gz otp-2e36a5f144ff1c996f02d5a55b07f3c840869ebf.tar.bz2 otp-2e36a5f144ff1c996f02d5a55b07f3c840869ebf.zip |
Merge branch 'hans/ssh/sftp_iolist/OTP-12853' into maint
* hans/ssh/sftp_iolist/OTP-12853:
ssh: correct sftp unicode and iolist bug
ssh: new unicode tests
ssh: delete ssh_unicode_SUITE
Diffstat (limited to 'lib/ssh/src')
-rw-r--r-- | lib/ssh/src/ssh_sftp.erl | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/ssh/src/ssh_sftp.erl b/lib/ssh/src/ssh_sftp.erl index 9fe2d56759..dbacf730cc 100644 --- a/lib/ssh/src/ssh_sftp.erl +++ b/lib/ssh/src/ssh_sftp.erl @@ -439,7 +439,7 @@ write_file(Pid, Name, List) -> write_file(Pid, Name, List, ?FILEOP_TIMEOUT). write_file(Pid, Name, List, FileOpTimeout) when is_list(List) -> - write_file(Pid, Name, unicode:characters_to_binary(List), FileOpTimeout); + write_file(Pid, Name, list_to_binary(List), FileOpTimeout); write_file(Pid, Name, Bin, FileOpTimeout) -> case open(Pid, Name, [write, binary], FileOpTimeout) of {ok, Handle} -> @@ -611,8 +611,7 @@ do_handle_call({pread,Async,Handle,At,Length}, From, State) -> fun({ok,Data}, State2) -> case get_mode(Handle, State2) of binary -> {{ok,Data}, State2}; - text -> - {{ok,unicode:characters_to_list(Data)}, State2} + text -> {{ok,binary_to_list(Data)}, State2} end; (Rep, State2) -> {Rep, State2} |