From 4a0cb2806a75ca4a36472835fcbe0f41085902b2 Mon Sep 17 00:00:00 2001 From: joeyh Date: Sun, 16 Sep 2007 17:06:14 +0000 Subject: [PATCH] * vidir: Force numbers to normalised integers. * vidir: Abort on unknown item numbers rather than deleting them. Closes: #442440 --- debian/changelog | 8 ++++++++ vidir | 5 ++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 9e6e07c..eb0e554 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +moreutils (0.24) unstable; urgency=low + + * vidir: Force numbers to normalised integers. + * vidir: Abort on unknown item numbers rather than deleting them. + Closes: #442440 + + -- Joey Hess Sun, 16 Sep 2007 13:05:54 -0400 + moreutils (0.23) unstable; urgency=low * Add pointer to join from combine's man page. Closes: #435516 diff --git a/vidir b/vidir index 6df58bd..ebc946d 100755 --- a/vidir +++ b/vidir @@ -123,11 +123,10 @@ open (IN, $tmp->filename) || die "$0: cannot read ".$tmp->filename.": $!\n"; while () { chomp; if (/^(\d+)\t{0,1}(.*)/) { - my $num=$1; + my $num=int($1); my $name=$2; if (! exists $item{$num}) { - print STDERR "$0: unknown item number $num\n"; - $error=1; + die "$0: unknown item number $num\n"; } elsif ($name ne $item{$num}) { next unless length $name; -- 2.39.5