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: #824493pull/51/merge
parent
ca24918f57
commit
b47fd57c1a
|
@ -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…
Reference in New Issue