Merge tag 'upstream/3.3.3'
[debian/amanda] / perl / Amanda / Taper / Scan.pm
index f757b9b8602719b64dc063c2d1859bd899be2dd2..7d05c73c76b5589c5f5e50d5220419ec6bc6c676 100644 (file)
@@ -1,8 +1,9 @@
-# Copyright (c) 2010 Zmanda, Inc.  All Rights Reserved.
+# 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;
     }