- my $options = $ENV{WGET_OPTIONS};
- $options or $options = "";
-
- $mirror =~ s/\/$//;
- if( $mirror =~ /^file:\/\// ) {
- my $cache = $mirror;
- $cache =~ s/file:\/\///g;
- if(system("test -d $cache")) {
- print STDERR "Wrong local cache directory -$cache-.\n";
+ my $options = $ENV{WGET_OPTIONS} || "";
+
+ $mirror =~ s!/$!!;
+
+ if ($mirror =~ s!^file://!!) {
+ if (! -d "$mirror") {
+ print STDERR "Wrong local cache directory -$mirror-.\n";