src/backup/catalog_shell.rs: sort output of list-selected
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
This commit is contained in:
parent
6d04612955
commit
f084505ec5
@ -418,8 +418,11 @@ fn restore_selected_command(target: String) -> Result<(), Error> {
|
|||||||
/// List entries currently selected for restore.
|
/// List entries currently selected for restore.
|
||||||
fn list_selected_command() -> Result<(), Error> {
|
fn list_selected_command() -> Result<(), Error> {
|
||||||
Context::with(|ctx| {
|
Context::with(|ctx| {
|
||||||
|
let mut list = ctx.selected.iter().collect::<Vec<&Vec<u8>>>();
|
||||||
|
list.sort();
|
||||||
|
|
||||||
let mut out = std::io::stdout();
|
let mut out = std::io::stdout();
|
||||||
for entry in &ctx.selected {
|
for entry in list {
|
||||||
out.write_all(entry)?;
|
out.write_all(entry)?;
|
||||||
out.write_all(&[b'\n'])?;
|
out.write_all(&[b'\n'])?;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user