aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2018-04-19 16:23:03 +0200
committerErlang/OTP <[email protected]>2018-04-19 16:23:03 +0200
commit602bd9d348471ef4974d04650c27effb2bf78f1c (patch)
tree3d03b34aaefbf5c7e38dfe0a026447b86b363531 /lib
parent6fad272f6b0a6b751386497191eb26e62e800ae2 (diff)
parent64f9a0b64a032666db824f139967f7abd5ea7046 (diff)
downloadotp-602bd9d348471ef4974d04650c27effb2bf78f1c.tar.gz
otp-602bd9d348471ef4974d04650c27effb2bf78f1c.tar.bz2
otp-602bd9d348471ef4974d04650c27effb2bf78f1c.zip
Merge branch 'hans/ssh/sftpd_rm_dir_err_20/OTP-15004' into maint-20
* hans/ssh/sftpd_rm_dir_err_20/OTP-15004: ssh: Fix ssh_sftpd:handle_op not returning State
Diffstat (limited to 'lib')
-rw-r--r--lib/ssh/src/ssh_sftpd.erl6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/ssh/src/ssh_sftpd.erl b/lib/ssh/src/ssh_sftpd.erl
index 427edf01ab..a9136e5614 100644
--- a/lib/ssh/src/ssh_sftpd.erl
+++ b/lib/ssh/src/ssh_sftpd.erl
@@ -360,10 +360,12 @@ handle_op(?SSH_FXP_REMOVE, ReqId, <<?UINT32(PLen), BPath:PLen/binary>>,
case IsDir of %% This version 6 we still have ver 5
true when Vsn > 5 ->
ssh_xfer:xf_send_status(State0#state.xf, ReqId,
- ?SSH_FX_FILE_IS_A_DIRECTORY, "File is a directory");
+ ?SSH_FX_FILE_IS_A_DIRECTORY, "File is a directory"),
+ State0;
true ->
ssh_xfer:xf_send_status(State0#state.xf, ReqId,
- ?SSH_FX_FAILURE, "File is a directory");
+ ?SSH_FX_FAILURE, "File is a directory"),
+ State0;
false ->
{Status, FS1} = FileMod:delete(Path, FS0),
State1 = State0#state{file_state = FS1},