From 6c82d9eb6476216458a5762edb41cecd3d4d595e Mon Sep 17 00:00:00 2001 From: Fredrik Gustafsson Date: Tue, 27 Nov 2012 16:50:15 +0100 Subject: Added a file_is_a_directory to a proper status return --- lib/ssh/src/ssh_xfer.erl | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/ssh/src/ssh_xfer.erl') diff --git a/lib/ssh/src/ssh_xfer.erl b/lib/ssh/src/ssh_xfer.erl index d5b6dd03d1..e72e2e982f 100644 --- a/lib/ssh/src/ssh_xfer.erl +++ b/lib/ssh/src/ssh_xfer.erl @@ -383,6 +383,7 @@ decode_status(Status) -> ?SSH_FX_UNKNOWN_PRINCIPLE -> unknown_principle; ?SSH_FX_LOCK_CONFlICT -> lock_conflict; ?SSH_FX_NOT_A_DIRECTORY -> not_a_directory; + ?SSH_FX_FILE_IS_A_DIRECTORY -> file_is_a_directory; _ -> {error,Status} end. @@ -392,6 +393,7 @@ encode_erlang_status(Status) -> eof -> ?SSH_FX_EOF; enoent -> ?SSH_FX_NO_SUCH_FILE; eacces -> ?SSH_FX_PERMISSION_DENIED; + eisdir -> ?SSH_FX_FILE_IS_A_DIRECTORY; _ -> ?SSH_FX_FAILURE end. -- cgit v1.2.3 From b5f755bab947c220c6ec434b121ccbc1d0a2476e Mon Sep 17 00:00:00 2001 From: Fredrik Gustafsson Date: Wed, 28 Nov 2012 16:26:21 +0100 Subject: sftp ver6 mods, SSH_FX_CANNOT_DELETE added as parameter --- lib/ssh/src/ssh_xfer.erl | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/ssh/src/ssh_xfer.erl') diff --git a/lib/ssh/src/ssh_xfer.erl b/lib/ssh/src/ssh_xfer.erl index e72e2e982f..91607ce69c 100644 --- a/lib/ssh/src/ssh_xfer.erl +++ b/lib/ssh/src/ssh_xfer.erl @@ -384,6 +384,7 @@ decode_status(Status) -> ?SSH_FX_LOCK_CONFlICT -> lock_conflict; ?SSH_FX_NOT_A_DIRECTORY -> not_a_directory; ?SSH_FX_FILE_IS_A_DIRECTORY -> file_is_a_directory; + ?SSH_FX_CANNOT_DELETE -> cannot_delete; _ -> {error,Status} end. @@ -394,6 +395,7 @@ encode_erlang_status(Status) -> enoent -> ?SSH_FX_NO_SUCH_FILE; eacces -> ?SSH_FX_PERMISSION_DENIED; eisdir -> ?SSH_FX_FILE_IS_A_DIRECTORY; + eperm -> ?SSH_FX_CANNOT_DELETE; _ -> ?SSH_FX_FAILURE end. -- cgit v1.2.3 From b66486468476734419ec4e3aa9cbac766aa012fe Mon Sep 17 00:00:00 2001 From: Fredrik Gustafsson Date: Thu, 29 Nov 2012 14:12:15 +0100 Subject: Added eexist to return proper sftp parameter --- lib/ssh/src/ssh_xfer.erl | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/ssh/src/ssh_xfer.erl') diff --git a/lib/ssh/src/ssh_xfer.erl b/lib/ssh/src/ssh_xfer.erl index 91607ce69c..4dfd9ed8b0 100644 --- a/lib/ssh/src/ssh_xfer.erl +++ b/lib/ssh/src/ssh_xfer.erl @@ -396,6 +396,7 @@ encode_erlang_status(Status) -> eacces -> ?SSH_FX_PERMISSION_DENIED; eisdir -> ?SSH_FX_FILE_IS_A_DIRECTORY; eperm -> ?SSH_FX_CANNOT_DELETE; + eexist -> ?SSH_FX_FILE_ALREADY_EXISTS; _ -> ?SSH_FX_FAILURE end. -- cgit v1.2.3