diff --git a/src/archive/sevenz.rs b/src/archive/sevenz.rs index 587a4a11..6ee345d5 100644 --- a/src/archive/sevenz.rs +++ b/src/archive/sevenz.rs @@ -49,7 +49,7 @@ where if let Ok(handle) = &output_handle { if matches!(Handle::from_path(path), Ok(x) if &x == handle) { warning(format!( - "Cannot compress `{}` into itself, skipping.", + "Cannot compress `{}` into itself, skipping", output_path.display() )); @@ -62,7 +62,7 @@ where // spoken text for users using screen readers, braille displays // and so on if !quiet { - info(format!("Compressing '{}'.", EscapedPathDisplay::new(path))); + info(format!("Compressing '{}'", EscapedPathDisplay::new(path))); } let metadata = match path.metadata() { diff --git a/src/archive/tar.rs b/src/archive/tar.rs index c313f8f6..d20aa7db 100644 --- a/src/archive/tar.rs +++ b/src/archive/tar.rs @@ -109,7 +109,7 @@ where if let Ok(handle) = &output_handle { if matches!(Handle::from_path(path), Ok(x) if &x == handle) { warning(format!( - "Cannot compress `{}` into itself, skipping.", + "Cannot compress `{}` into itself, skipping", output_path.display() )); @@ -122,7 +122,7 @@ where // spoken text for users using screen readers, braille displays // and so on if !quiet { - info(format!("Compressing '{}'.", EscapedPathDisplay::new(path))); + info(format!("Compressing '{}'", EscapedPathDisplay::new(path))); } if path.is_dir() { diff --git a/src/archive/zip.rs b/src/archive/zip.rs index eb420d47..af209501 100644 --- a/src/archive/zip.rs +++ b/src/archive/zip.rs @@ -197,7 +197,7 @@ where if let Ok(handle) = &output_handle { if matches!(Handle::from_path(path), Ok(x) if &x == handle) { warning(format!( - "Cannot compress `{}` into itself, skipping.", + "Cannot compress `{}` into itself, skipping", output_path.display() )); } @@ -208,7 +208,7 @@ where // spoken text for users using screen readers, braille displays // and so on if !quiet { - info(format!("Compressing '{}'.", EscapedPathDisplay::new(path))); + info(format!("Compressing '{}'", EscapedPathDisplay::new(path))); } let metadata = match path.metadata() { diff --git a/src/commands/decompress.rs b/src/commands/decompress.rs index 7e3f6179..6c35c250 100644 --- a/src/commands/decompress.rs +++ b/src/commands/decompress.rs @@ -78,7 +78,7 @@ pub fn decompress_file( // as screen readers may not read a commands exit code, making it hard to reason // about whether the command succeeded without such a message info_accessible(format!( - "Successfully decompressed archive in {} ({} files).", + "Successfully decompressed archive in {} ({} files)", nice_directory_display(output_dir), files_unpacked )); @@ -228,7 +228,7 @@ pub fn decompress_file( // as screen readers may not read a commands exit code, making it hard to reason // about whether the command succeeded without such a message info_accessible(format!( - "Successfully decompressed archive in {}.", + "Successfully decompressed archive in {}", nice_directory_display(output_dir) )); info_accessible(format!("Files unpacked: {}", files_unpacked)); @@ -253,7 +253,7 @@ fn smart_unpack( let temp_dir_path = temp_dir.path(); info_accessible(format!( - "Created temporary directory {} to hold decompressed elements.", + "Created temporary directory {} to hold decompressed elements", nice_directory_display(temp_dir_path) )); @@ -283,7 +283,7 @@ fn smart_unpack( // Rename the temporary directory to the archive name, which is output_file_path fs::rename(&previous_path, &new_path)?; info_accessible(format!( - "Successfully moved \"{}\" to \"{}\".", + "Successfully moved \"{}\" to \"{}\"", nice_directory_display(&previous_path), nice_directory_display(&new_path), )); diff --git a/src/commands/mod.rs b/src/commands/mod.rs index c4cd8e01..f2963591 100644 --- a/src/commands/mod.rs +++ b/src/commands/mod.rs @@ -111,7 +111,7 @@ pub fn run( // having a final status message is important especially in an accessibility context // as screen readers may not read a commands exit code, making it hard to reason // about whether the command succeeded without such a message - info_accessible(format!("Successfully compressed '{}'.", path_to_str(&output_path))); + info_accessible(format!("Successfully compressed '{}'", path_to_str(&output_path))); } else { // If Ok(false) or Err() occurred, delete incomplete file at `output_path` // diff --git a/src/extension.rs b/src/extension.rs index 0b6af9a1..f8d73899 100644 --- a/src/extension.rs +++ b/src/extension.rs @@ -200,7 +200,7 @@ pub fn separate_known_extensions_from_name(path: &Path) -> (&Path, Vec crate::Result<()> { fs::create_dir_all(path)?; // creating a directory is an important change to the file system we // should always inform the user about - info_accessible(format!("Directory {} created.", EscapedPathDisplay::new(path))); + info_accessible(format!("Directory {} created", EscapedPathDisplay::new(path))); } Ok(()) }