Author: poeml Date: Wed Jan 27 00:54:38 2010 New Revision: 7945 URL: http://svn.mirrorbrain.org/viewvc/mirrorbrain?rev=7945&view=rev Log: mb scan: - cleaner patch for r7944, avoiding a Perl warning. Modified: trunk/tools/scanner.pl Modified: trunk/tools/scanner.pl URL: http://svn.mirrorbrain.org/viewvc/mirrorbrain/trunk/tools/scanner.pl?rev=7945&r1=7944&r2=7945&view=diff ============================================================================== --- trunk/tools/scanner.pl (original) +++ trunk/tools/scanner.pl Wed Jan 27 00:54:38 2010 @@ -1194,11 +1194,13 @@ my $port = 21; $port = $1 if $url =~ s{:(\d+)$}{}; # port number? + my $user = 'anonymous'; + my $pass = "$0@" . Net::Domain::hostfqdn; my $auth = $1 if $url =~ s{^([^:]*:[^@]*)@}{}; # auth data? - my $user = $1 if $auth =~ s{^([^:]*):}{}; - my $pass = $auth; - $user ||= 'anonymous'; - $pass ||= "$0@" . Net::Domain::hostfqdn; + if (defined $auth) { + $user = $1 if $auth =~ s{^([^:]*):}{}; + $pass = $auth; + } my $ftp = Net::FTP->new($url, Timeout => 360, Port => $port, Debug => (($verbose||0)>2)?1:0, Passive => 1, Hash => 0); unless (defined $ftp) { _______________________________________________ mirrorbrain-commits mailing list Archive: http://mirrorbrain.org/archive/mirrorbrain-commits/ Note: To remove yourself from this list, send a mail with the content unsubscribe to the address mirrorbrain-commits-request_at_mirrorbrain.orgReceived on Tue Jan 26 2010 - 23:54:43 GMT
This archive was generated by hypermail 2.2.0 : Wed Jan 27 2010 - 00:17:08 GMT