feat: add compression and digest support with database schema updates
This commit is contained in:
committed by
Andrew Phillips (aider)
parent
9b61a37036
commit
bbdfe19836
@@ -141,30 +141,24 @@ pub fn mode_list(
|
||||
},
|
||||
ColumnType::Compression => {
|
||||
Cell::new(&string_column(item.compression.to_string(), column_width))
|
||||
},
|
||||
}
|
||||
ColumnType::DigestType => {
|
||||
Cell::new(&string_column(item.digest_type.to_string(), column_width))
|
||||
},
|
||||
ColumnType::DigestValue => {
|
||||
match item.digest_value {
|
||||
Some(ref value) => Cell::new(&string_column(value.to_string(), column_width)),
|
||||
None => Cell::new("Missing")
|
||||
.with_style(Attr::ForegroundColor(color::RED))
|
||||
.with_style(Attr::Bold),
|
||||
}
|
||||
}
|
||||
ColumnType::DigestValue => match item.digest_value {
|
||||
Some(ref value) => Cell::new(&string_column(value.to_string(), column_width)),
|
||||
None => Cell::new("Missing")
|
||||
.with_style(Attr::ForegroundColor(color::RED))
|
||||
.with_style(Attr::Bold),
|
||||
},
|
||||
ColumnType::FileSize => match item_path.metadata() {
|
||||
Ok(metadata) => Cell::new_align(
|
||||
&size_column(
|
||||
metadata.len(),
|
||||
args.options.human_readable,
|
||||
column_width,
|
||||
),
|
||||
&size_column(metadata.len(), args.options.human_readable, column_width),
|
||||
Alignment::RIGHT,
|
||||
),
|
||||
Err(_) => Cell::new_align("Missing", Alignment::RIGHT)
|
||||
.with_style(Attr::ForegroundColor(color::RED))
|
||||
.with_style(Attr::Bold),
|
||||
.with_style(Attr::ForegroundColor(color::RED))
|
||||
.with_style(Attr::Bold),
|
||||
},
|
||||
ColumnType::FilePath => Cell::new(&string_column(
|
||||
item_path.clone().into_os_string().into_string().unwrap(),
|
||||
|
||||
Reference in New Issue
Block a user