diff --git a/src/files/trash.rs b/src/files/trash.rs index 69f168d..58a0f6d 100644 --- a/src/files/trash.rs +++ b/src/files/trash.rs @@ -69,7 +69,7 @@ impl Display for Error { Error::Hub(err) => write!(f, "{}", err), Error::GetFile(err) => write!(f, "Failed to get file: {}", err), Error::Update(err) => write!(f, "Failed to trash file: {}", err), - Error::IsDirectory(f) => write!( + Error::IsDirectory(name) => write!( f, "'{}' is a directory, use --recursive to trash directories", name diff --git a/src/files/untrash.rs b/src/files/untrash.rs index f9f74e1..427ab7e 100644 --- a/src/files/untrash.rs +++ b/src/files/untrash.rs @@ -69,7 +69,7 @@ impl Display for Error { Error::Hub(err) => write!(f, "{}", err), Error::GetFile(err) => write!(f, "Failed to get file: {}", err), Error::Update(err) => write!(f, "Failed to update file: {}", err), - Error::IsDirectory(f) => write!( + Error::IsDirectory(name) => write!( f, "'{}' is a directory, use --recursive to trash directories", name @@ -112,7 +112,7 @@ impl PatchFile { } fn err_if_directory(file: &google_drive3::api::File, config: &Config) -> Result<(), Error> { - if drive_file::is_directory(file) && !config.trash_directories { + if drive_file::is_directory(file) && !config.untrash_directories { let name = file .name .as_ref()