Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/apt-mirror/apt-mirror.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Drung <benjamin.drung@profitbricks.com>2016-11-08 20:31:00 +0300
committerBenjamin Drung <benjamin.drung@profitbricks.com>2016-11-08 20:31:00 +0300
commitb47fd57c1a4d9d52b553cc0be13be9fcc64943fc (patch)
tree806cf52cb9e06816b1bab5bbcf0ab2ec0e30112c
parentca24918f57c53f128741398a5255d6aa6c95ca34 (diff)
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
-rwxr-xr-xapt-mirror2
1 files changed, 1 insertions, 1 deletions
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 = $_;
}