From: Joerg Jaspert Date: Sun, 4 Jul 2010 08:39:59 +0000 (+0200) Subject: debianqueued X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c13eb0279d396c26cb3af67f14d248ed84afd834;p=dak debianqueued rename does not work across devices. Use move from File::Copy instead. Signed-off-by: Joerg Jaspert --- diff --git a/tools/debianqueued-0.9/debianqueued b/tools/debianqueued-0.9/debianqueued index af8d70da..8bdfe555 100755 --- a/tools/debianqueued-0.9/debianqueued +++ b/tools/debianqueued-0.9/debianqueued @@ -22,6 +22,7 @@ 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"); @@ -1320,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" ); } @@ -1391,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" ); }