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 2016-11-08 18:31:00 +01:00
parent ca24918f57
commit b47fd57c1a
1 changed files with 1 additions and 1 deletions

View File

@ -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 = $_;
}