From 6c21854b6dca0c25d196bf681abb023375648ce6 Mon Sep 17 00:00:00 2001 From: JasterV <49537445+JasterV@users.noreply.github.com> Date: Tue, 21 Apr 2026 17:33:43 +0200 Subject: [PATCH] feat: Parse already exists error when parsing into io error --- src/error.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/error.rs b/src/error.rs index 1838ebea..901add7f 100644 --- a/src/error.rs +++ b/src/error.rs @@ -220,6 +220,7 @@ impl From for io::Error { ErrorCode::Session(raw::LIBSSH2_ERROR_TIMEOUT) => io::ErrorKind::TimedOut, ErrorCode::SFTP(raw::LIBSSH2_FX_NO_SUCH_FILE) | ErrorCode::SFTP(raw::LIBSSH2_FX_NO_SUCH_PATH) => io::ErrorKind::NotFound, + ErrorCode::SFTP(raw::LIBSSH2_FX_FILE_ALREADY_EXISTS) => io::ErrorKind::AlreadyExists, _ => io::ErrorKind::Other, }; io::Error::new(kind, err.msg)