You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The scanner.pl bails out if a directory is not found on an FTP sever during scanning:
Net::FTP=GLOB(0x77e8a8)<<< 230 Anonymous access granted, restrictions apply
Net::FTP=GLOB(0x77e8a8)>>> TYPE I
Net::FTP=GLOB(0x77e8a8)<<< 200 Type set to I
belnet: connected to ftp.belnet.be, (anonymous,/opt/csw/bin/scanner@mirror-
test.opencsw.org)
Net::FTP=GLOB(0x77e8a8)>>> CWD /mirrorsx/opencsw/
Net::FTP=GLOB(0x77e8a8)<<< 550 /mirrorsx/opencsw/: No such file or directory
$VAR1 = '550 failed: ftp-cwd(/mirrorsx/opencsw/): '; DIE: (=> => /opt/csw/bin/scanner 317 main::ftp_readdir)
Can't use string ("550 failed: ftp-cwd(/mirrorsx/op") as an ARRAY ref while "strict
refs" in use at /opt/csw/bin/scanner line 804.
Completed in 1 seconds
This is due to the regex match of a scalar string made against a ref to a string, this
should be just a regex match against the scaler. This patch fixes the issue:
From 5ca8b992d77a3479f1081432d21f8a96382b41c6 Mon Sep 17 00:00:00 2001
From: Dagobert Michelsen dam@opencsw.org
Date: Sat, 1 Feb 2014 14:56:06 +0100
Subject: [PATCH] Do not take ref on a simple scalar string or it wont match
Issue migrated (2015-06-05) from old issue tracker http://mirrorbrain.org/issues/issue139
msg502 (view) Author: dagobert Date: 2014-02-01.14:05:44
The scanner.pl bails out if a directory is not found on an FTP sever during scanning:
Net::FTP=GLOB(0x77e8a8)<<< 230 Anonymous access granted, restrictions apply
Net::FTP=GLOB(0x77e8a8)>>> TYPE I
Net::FTP=GLOB(0x77e8a8)<<< 200 Type set to I
belnet: connected to ftp.belnet.be, (anonymous,/opt/csw/bin/scanner@mirror-
test.opencsw.org)
Net::FTP=GLOB(0x77e8a8)>>> CWD /mirrorsx/opencsw/
Net::FTP=GLOB(0x77e8a8)<<< 550 /mirrorsx/opencsw/: No such file or directory
$VAR1 = '550 failed: ftp-cwd(/mirrorsx/opencsw/): ';
DIE: (=> => /opt/csw/bin/scanner 317 main::ftp_readdir)
Can't use string ("550 failed: ftp-cwd(/mirrorsx/op") as an ARRAY ref while "strict
refs" in use at /opt/csw/bin/scanner line 804.
Completed in 1 seconds
This is due to the regex match of a scalar string made against a ref to a string, this
should be just a regex match against the scaler. This patch fixes the issue:
From 5ca8b992d77a3479f1081432d21f8a96382b41c6 Mon Sep 17 00:00:00 2001
From: Dagobert Michelsen dam@opencsw.org
Date: Sat, 1 Feb 2014 14:56:06 +0100
Subject: [PATCH] Do not take ref on a simple scalar string or it wont match
tools/scanner.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/scanner.pl b/tools/scanner.pl
index ab9bcb8..4216721 100755
--- a/tools/scanner.pl
+++ b/tools/scanner.pl
@@ -774,7 +774,7 @@ sub ftp_readdir
return unless defined $ftp;
my $text = ftp_cont($ftp, "$url/$name");
if(!ref($text) && $text =~ m/^(\d\d\d)\s/) { # some FTP status code? Not
good.
if(!ref($text) && $text =~ m/^(\d\d\d)\s/) { # some FTP status code? Not good.
Bug: Net::FTP wrongly reports timeouts (421) as code 550:
sunsite.informatik.rwth-aachen.de: ftp dir: ftp://sunsite.informatik.rwth-
aachen.de/pub/linux/
opensuse/distribution/11.0/repo/debug/suse/i686
1.8.4.1
msg512 (view) Author: poeml Date: 2014-02-02.12:34:49
fixed in r8358. Thanks!
(end of migrated issue)
The text was updated successfully, but these errors were encountered: