]> err.no Git - moreutils/commitdiff
* vidir: Force numbers to normalised integers. 0.24
authorjoeyh <joeyh>
Sun, 16 Sep 2007 17:06:14 +0000 (17:06 +0000)
committerjoeyh <joeyh>
Sun, 16 Sep 2007 17:06:14 +0000 (17:06 +0000)
* vidir: Abort on unknown item numbers rather than deleting them.
Closes: #442440
debian/changelog
vidir

index 9e6e07c08caf88087443ded122bc41d97563d69b..eb0e554a24f6e7b67ecd1294aa29e4c40ea7cb79 100644 (file)
@@ -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 <joeyh@debian.org>  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 6df58bd7dd73a2d0fc4659e388033d363fce2159..ebc946d8cec2d8b3d7d7f17fc91fe5ab20a19794 100755 (executable)
--- a/vidir
+++ b/vidir
@@ -123,11 +123,10 @@ open (IN, $tmp->filename) || die "$0: cannot read ".$tmp->filename.": $!\n";
 while (<IN>) {
        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;