Skip to content

Commit

Permalink
Humanize bytes and show path in big file warning
Browse files Browse the repository at this point in the history
  • Loading branch information
nivekuil committed Oct 25, 2016
1 parent c9c100a commit 936adf9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,8 @@ fn copy_file<S, D>(source: S, dest: D) -> io::Result<()>
let filetype = metadata.file_type();

if metadata.len() > BIG_FILE_THRESHOLD {
println!("About to copy a big file ({} bytes)", metadata.len());
println!("About to copy a big file ({} is {})", source.display(),
humanize_bytes(metadata.len()));
if prompt_yes("Permanently delete this file instead?") {
return Ok(())
}
Expand Down

0 comments on commit 936adf9

Please sign in to comment.