X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=tools%2Fdebianqueued-0.9%2Fdebianqueued;h=8bdfe55563c3a15f34cdbee3c8992679e67c264d;hb=bc5b21c7473dc4305703420e67db7a73218d95c2;hp=f9974366950bf075937946fed73117c0c15ad55b;hpb=40908ec831933a46339b740e0371f4fccbf7adb9;p=dak.git diff --git a/tools/debianqueued-0.9/debianqueued b/tools/debianqueued-0.9/debianqueued index f9974366..8bdfe555 100755 --- a/tools/debianqueued-0.9/debianqueued +++ b/tools/debianqueued-0.9/debianqueued @@ -22,6 +22,9 @@ use Net::FTP; use Socket qw( PF_INET AF_INET SOCK_STREAM ); use Config; use Sys::Hostname; +use File::Copy; + +setlocale(&POSIX::LC_ALL, "C"); # --------------------------------------------------------------------------- # configuration @@ -1209,7 +1212,9 @@ outer_loop: while () { $selecteddelayed = $1; s,^DELAYED/[0-9]+-day/,,; } - if ( $origword eq "--searchdirs" ) { + if (m,(^|/)\*,) { + msg("mail,log", "$_: filename component cannot start with a wildcard\n"); + } elsif ( $origword eq "--searchdirs" ) { $selecteddelayed = -2; } elsif (m,/,) { msg( @@ -1316,8 +1321,8 @@ outer_loop: while () { if ( $afile =~ m/\.changes$/ ) { utime undef, undef, ("$dir/$afile"); } - if ( !rename "$dir/$afile", "$target_dir/$afile" ) { - msg( "mail,log", "rename: $!\n" ); + if ( !move("$dir/$afile", "$target_dir/$afile") ) { + msg( "mail,log", "move: $!\n" ); } else { msg( "mail,log", "$afile moved to $target_delay-day\n" ); } @@ -1387,8 +1392,8 @@ sub age_delayed_queues() { my @thesefiles = ( $achanges =~ m,.*/([^/]*), ); push( @thesefiles, get_filelist_from_known_good_changes($achanges) ); for my $afile (@thesefiles) { - if ( !rename "$dir/$afile", "$target_dir/$afile" ) { - msg( "log", "rename: $!\n" ); + if ( !move("$dir/$afile", "$target_dir/$afile") ) { + msg( "log", "move: $!\n" ); } else { msg( "log", "$afile moved to $target_dir\n" ); }