Update metadata human printout to not include canonicalized_path if missing

pull/38/head v0.9.1
Chip Senkbeil 3 years ago
parent 9a67418227
commit f51b8420f3
No known key found for this signature in database
GPG Key ID: 35EF1F8EC72A4131

2
Cargo.lock generated

@ -179,7 +179,7 @@ dependencies = [
[[package]]
name = "distant"
version = "0.9.0"
version = "0.9.1"
dependencies = [
"bytes",
"derive_more",

@ -2,7 +2,7 @@
name = "distant"
description = "Operate on a remote computer through file and process manipulation"
categories = ["command-line-utilities"]
version = "0.9.0"
version = "0.9.1"
authors = ["Chip Senkbeil <chip@senkbeil.org>"]
edition = "2018"
homepage = "https://github.com/chipsenkbeil/distant"

@ -311,7 +311,7 @@ fn format_shell(res: Response) -> ResponseOut {
modified,
} => ResponseOut::StdoutLine(format!(
concat!(
"Canonicalized Path: {:?}\n",
"{}",
"Type: {}\n",
"Len: {}\n",
"Readonly: {}\n",
@ -319,7 +319,9 @@ fn format_shell(res: Response) -> ResponseOut {
"Last Accessed: {}\n",
"Last Modified: {}",
),
canonicalized_path.unwrap_or_default(),
canonicalized_path
.map(|p| format!("Canonicalized Path: {:?}\n", p))
.unwrap_or_default(),
file_type.as_ref(),
len,
readonly,

Loading…
Cancel
Save