Imported Upstream version 3.3.3
[debian/amanda] / perl / Amanda / Taper / Scan.pm
index d8d7a414ab79490d3f4c76b74474969ebb378d1c..7d05c73c76b5589c5f5e50d5220419ec6bc6c676 100644 (file)
@@ -1,8 +1,9 @@
 # Copyright (c) 2010-2012 Zmanda, Inc.  All Rights Reserved.
 #
-# This library is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License version 2.1 as
-# published by the Free Software Foundation.
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+#* License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful, but
 # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
@@ -337,6 +338,7 @@ sub oldest_reusable_volume {
     for my $tle (@{$self->{'tapelist'}->{'tles'}}) {
        next unless $tle->{'reuse'};
        next if $tle->{'datestamp'} eq '0' and !$params{'new_label_ok'};
+       next if $tle->{'label'} !~ $self->{'labelstr'};
        $num_acceptable++;
        $best = $tle;
     }