Just test that config file is readable

Test that the config file is readable (ie. "-e") before dying, not
strictly a file ("-f").

This allows one to more-easily generate dynamic configuration files
and pass them via `apt-mirror /dev/stdin` rather than having to create
temporary files.

Closes: #824493
pull/51/merge
Benjamin Drung 6 years ago
parent ca24918f57
commit b47fd57c1a
  1. 2
      apt-mirror

@ -135,7 +135,7 @@ my %clean_directory = ();
$config_file = "/etc/apt/mirror.list"; # Default value
if ( $_ = shift )
{
die("apt-mirror: invalid config file specified") unless -f $_;
die("apt-mirror: invalid config file specified") unless -e $_;
$config_file = $_;
}

Loading…
Cancel
Save