btrbk: add timestamp to info file on write

ionice
Axel Burri 2022-10-19 11:16:57 +02:00
parent 08cb900a9e
commit 25c8eb1705
1 changed files with 1 additions and 0 deletions

1
btrbk
View File

@ -2085,6 +2085,7 @@ sub system_write_raw_info($$;@)
# sort by %raw_info_sort, then by key # sort by %raw_info_sort, then by key
my @line = $append ? () : ("#btrbk-v$VERSION", "# Do not edit this file"); my @line = $append ? () : ("#btrbk-v$VERSION", "# Do not edit this file");
push @line, '#t=' . time;
foreach(sort { (($raw_info_sort{$a} // 99) <=> ($raw_info_sort{$b} // 99)) || ($a cmp $b) } keys %$raw_info) { foreach(sort { (($raw_info_sort{$a} // 99) <=> ($raw_info_sort{$b} // 99)) || ($a cmp $b) } keys %$raw_info) {
push @line, ($_ . '=' . $raw_info->{$_}); push @line, ($_ . '=' . $raw_info->{$_});
} }