use Socket qw( PF_INET AF_INET SOCK_STREAM );
use Config;
use Sys::Hostname;
+use File::Copy;
setlocale(&POSIX::LC_ALL, "C");
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" );
}
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" );
}