From cbb346bd3a06f1af56581a7f34d424bc6e29941d Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Mon, 5 Sep 2005 08:49:39 +0000 Subject: Fix bug 18234 : force download of ftp files when the timestamp couldn't be determined --- urpm/download.pm | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'urpm') diff --git a/urpm/download.pm b/urpm/download.pm index 7afdbc94..05383a1a 100644 --- a/urpm/download.pm +++ b/urpm/download.pm @@ -304,8 +304,6 @@ sub sync_curl { and $cur_ftp_file = shift @ftp_files; eval { $ftp_files_info{$cur_ftp_file}{time} = Date::Manip::ParseDate($1); - #- remove day and hour. - $ftp_files_info{$cur_ftp_file}{time} =~ s/(\d{6}).{4}(.*)/$1$2/; }; } } @@ -322,9 +320,9 @@ sub sync_curl { foreach (keys %ftp_files_info) { my ($lfile) = m|/([^/]*)$| or next; #- strange if we can't parse it correctly. my $ltime = eval { Date::Manip::ParseDate(scalar gmtime((stat $1)[9])) }; - $ltime =~ s/(\d{6}).{4}(.*)/$1$2/; #- remove day and hour. - -s $lfile == $ftp_files_info{$_}{size} && $ftp_files_info{$_}{time} eq $ltime or - push @ftp_files, $_; + $ltime or next; #- couldn't parse date, assume files are different (bug 18234) + -s $lfile == $ftp_files_info{$_}{size} && $ftp_files_info{$_}{time} eq $ltime + or push @ftp_files, $_; } } } -- cgit v1.2.1