diff --git a/CHANGELOG.md b/CHANGELOG.md index 0bc42767..716e5196 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,7 +35,7 @@ Released on ?? - Updated `crossterm` to `0.20` - Updated `open` to `2.0.1` - Added `tui-realm-stdlib 0.6.0` - - Replaced `ftp4` with `suppaftp 4.1.1` + - Replaced `ftp4` with `suppaftp 4.1.2` - Updated `tui-realm` to `0.6.0` ## 0.6.0 diff --git a/Cargo.lock b/Cargo.lock index ea2f5b18..06848920 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1324,9 +1324,9 @@ checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "suppaftp" -version = "4.1.1" +version = "4.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d8310cb2dcc312f9e941d35453a1b2cb654186f4ec60b02e2d778a221c3002b" +checksum = "29a4d861acfdc117c6d373c3b743c534dbbbb2d782e7646b27439a7c5282ad6a" dependencies = [ "chrono", "lazy_static", diff --git a/Cargo.toml b/Cargo.toml index ec78301c..7066e408 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -47,7 +47,7 @@ rpassword = "5.0.1" serde = { version = "^1.0.0", features = [ "derive" ] } simplelog = "0.10.0" ssh2 = "0.9.0" -suppaftp = { version = "4.1.1", features = [ "secure" ] } +suppaftp = { version = "4.1.2", features = [ "secure" ] } tempfile = "3.1.0" textwrap = "0.14.2" thiserror = "^1.0.0" diff --git a/src/filetransfer/ftp_transfer.rs b/src/filetransfer/ftp_transfer.rs index 32d96e3a..cd3e8e56 100644 --- a/src/filetransfer/ftp_transfer.rs +++ b/src/filetransfer/ftp_transfer.rs @@ -36,7 +36,7 @@ use std::path::{Path, PathBuf}; use std::time::UNIX_EPOCH; use suppaftp::native_tls::TlsConnector; use suppaftp::{ - list::{File, UnixPexQuery}, + list::{File, PosixPexQuery}, status::FILE_UNAVAILABLE, types::{FileType, Response}, FtpError, FtpStream, @@ -164,19 +164,19 @@ impl FtpFileTransfer { fn query_unix_pex(f: &File) -> (u8, u8, u8) { ( Self::pex_to_byte( - f.can_read(UnixPexQuery::Owner), - f.can_write(UnixPexQuery::Owner), - f.can_execute(UnixPexQuery::Owner), + f.can_read(PosixPexQuery::Owner), + f.can_write(PosixPexQuery::Owner), + f.can_execute(PosixPexQuery::Owner), ), Self::pex_to_byte( - f.can_read(UnixPexQuery::Group), - f.can_write(UnixPexQuery::Group), - f.can_execute(UnixPexQuery::Group), + f.can_read(PosixPexQuery::Group), + f.can_write(PosixPexQuery::Group), + f.can_execute(PosixPexQuery::Group), ), Self::pex_to_byte( - f.can_read(UnixPexQuery::Others), - f.can_write(UnixPexQuery::Others), - f.can_execute(UnixPexQuery::Others), + f.can_read(PosixPexQuery::Others), + f.can_write(PosixPexQuery::Others), + f.can_execute(PosixPexQuery::Others), ), ) } @@ -399,7 +399,7 @@ impl FileTransfer for FtpFileTransfer { match &mut self.stream { Some(stream) => match stream.mkdir(&dir.as_path().to_string_lossy()) { Ok(_) => Ok(()), - Err(FtpError::InvalidResponse(Response { + Err(FtpError::UnexpectedResponse(Response { // Directory already exists code: FILE_UNAVAILABLE, body: _,