aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh/src/ssh_sftpd.erl
diff options
context:
space:
mode:
authorFredrik Gustafsson <[email protected]>2012-11-28 10:52:45 +0100
committerFredrik Gustafsson <[email protected]>2012-11-28 10:52:45 +0100
commit3051d7a5833eb8cd4903a5fec749549de27a3c8d (patch)
tree40dabe3c011412d7d42cf23451aa9225c8d93802 /lib/ssh/src/ssh_sftpd.erl
parent6801fa8751fe1d495099230f5d49867fd8a91cfc (diff)
downloadotp-3051d7a5833eb8cd4903a5fec749549de27a3c8d.tar.gz
otp-3051d7a5833eb8cd4903a5fec749549de27a3c8d.tar.bz2
otp-3051d7a5833eb8cd4903a5fec749549de27a3c8d.zip
corrected is_dir call in sftpd
Diffstat (limited to 'lib/ssh/src/ssh_sftpd.erl')
-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 d6a7ee3859..21ba98a3e1 100644
--- a/lib/ssh/src/ssh_sftpd.erl
+++ b/lib/ssh/src/ssh_sftpd.erl
@@ -369,7 +369,8 @@ handle_op(?SSH_FXP_FSETSTAT, ReqId, <<?UINT32(HLen), BinHandle:HLen/binary,
handle_op(?SSH_FXP_REMOVE, ReqId, <<?UINT32(PLen), BPath:PLen/binary>>,
State0 = #state{file_handler = FileMod, file_state = FS0, xf = #ssh_xfer{vsn = Vsn}}) ->
Path = relate_file_name(BPath, State0),
- case FileMod:is_dir(Path) of %% This version 6 we still have ver 5
+ {IsDir, _FS1} = FileMod:is_dir(Path, FS0),
+ 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");
@@ -641,7 +642,8 @@ do_open(ReqId, State0, Path, Flags) ->
#state{file_handler = FileMod, file_state = FS0, root = Root, xf = #ssh_xfer{vsn = Vsn}} = State0,
XF = State0#state.xf,
F = [binary | Flags],
- case FileMod:is_dir(Path) of
+ {IsDir, _FS1} = FileMod:is_dir(Path, FS0),
+ case IsDir of
true when Vsn > 5 ->
ssh_xfer:xf_send_status(State0#state.xf, ReqId,
?SSH_FX_FILE_IS_A_DIRECTORY, "File is a directory");