From b47fd57c1a4d9d52b553cc0be13be9fcc64943fc Mon Sep 17 00:00:00 2001 From: Benjamin Drung Date: Tue, 8 Nov 2016 18:31:00 +0100 Subject: [PATCH] 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 --- apt-mirror | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apt-mirror b/apt-mirror index 389416c..ec9ceed 100755 --- a/apt-mirror +++ b/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 = $_; }