From 493fc700aa266855cc0dcbf8002424565ff7486b Mon Sep 17 00:00:00 2001 From: Michael Vrable Date: Mon, 4 Jun 2007 10:28:06 -0700 Subject: [PATCH] Make parser in restore.pl more tolerant, and reorder descriptor fields. --- restore.pl | 2 +- scandir.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/restore.pl b/restore.pl index 3a600b1..0ea7d2c 100755 --- a/restore.pl +++ b/restore.pl @@ -337,7 +337,7 @@ sub process_metadata { # Try to parse the data as "key: value" pairs of file metadata. Also # handle continuation lines, which start with whitespace and continue # the previous "key: value" pair. - if ($line =~ m/^(\w+):\s+(.*)\s*$/) { + if ($line =~ m/^(\w+):\s*(.*)$/) { $info{$1} = $2; $last_key = $1; } elsif ($line =~/^\s/ && defined $last_key) { diff --git a/scandir.cc b/scandir.cc index bf4a583..52c82f8 100644 --- a/scandir.cc +++ b/scandir.cc @@ -486,9 +486,9 @@ int main(int argc, char *argv[]) segment_list.insert(root->get_ref().get_segment()); descriptor << "Format: LBS Snapshot v0.1\n"; - descriptor << "Root: " << root->get_ref().to_string() << "\n"; strftime(desc_buf, sizeof(desc_buf), "%Y-%m-%d %H:%M:%S %z", &time_buf); descriptor << "Date: " << desc_buf << "\n"; + descriptor << "Root: " << root->get_ref().to_string() << "\n"; delete root; -- 2.20.1