From d321880a235fd73a3c2f5865b9cc03b9aec3865d Mon Sep 17 00:00:00 2001 From: Till Kamppeter Date: Wed, 17 Sep 2003 21:21:26 +0000 Subject: Fixed "Configure CUPS" function of printerdrake adding a second "..." in /etc/cups/cupsd.conf instead of replacing the existing one (fix of Titi's newly introduced bug from May 19 14:17:58 2003 UTC). --- perl-install/printer/main.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'perl-install/printer/main.pm') diff --git a/perl-install/printer/main.pm b/perl-install/printer/main.pm index 5bd467b03..87b5b0c6f 100644 --- a/perl-install/printer/main.pm +++ b/perl-install/printer/main.pm @@ -717,7 +717,7 @@ sub read_location { my $location_end = -1; # Go through all the lines, bail out when start and end line found for (my $i = 0; - $i <= $#{$cupsd_conf_ptr}; + $i <= $#{$cupsd_conf_ptr} and $location_end == -1; $i++) { if ($cupsd_conf_ptr->[$i] =~ m!^\s*<\s*Location\s+$path\s*>!) { # Start line of block @@ -760,7 +760,7 @@ sub rip_location { if (any { m!^\s*! } @$cupsd_conf_ptr) { # Go through all the lines, bail out when start and end line found for (my $i = 0; - $i <= $#{$cupsd_conf_ptr} == -1; + $i <= $#{$cupsd_conf_ptr} and $location_end == -1; $i++) { if ($cupsd_conf_ptr->[$i] =~ m!^\s*<\s*Location\s+$path\s*>!) { # Start line of block -- cgit v1.2.1