From 9019b937fb749673a02f983f7d103946caf9567f Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 20 Oct 2003 15:22:35 +0000 Subject: perform test once and move it out of the save loop --- perl-install/standalone/drakperm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'perl-install/standalone') diff --git a/perl-install/standalone/drakperm b/perl-install/standalone/drakperm index d5c125105..b23ab5b80 100755 --- a/perl-install/standalone/drakperm +++ b/perl-install/standalone/drakperm @@ -214,15 +214,15 @@ sub load_perms() { local *F; open F, $file; + my @editable = if_($file ne $perm_files{editable}, editable => $pixbuf); local $_; - my $is_uneditable = $file ne $perm_files{editable}; while () { next if /^#/; # Editable, Path, User, Group, Permissions if (m/^(\S+)\s+([^.\s]+)\.(\S+)?\s+(\d+)/) { - push @rules, { if_($is_uneditable, editable => $pixbuf), path => $1, user => $2, group => $3, perms => $4, index => $index }; + push @rules, { @editable, path => $1, user => $2, group => $3, perms => $4, index => $index }; } elsif (m/^(\S+)\s+current?\s+(\d+)/) { - push @rules, { if_($is_uneditable, editable => $pixbuf), path => $1, user => 'current', group => '', perms => $2, index => $index }; + push @rules, { @editable, path => $1, user => 'current', group => '', perms => $2, index => $index }; } else { warn "unparsable \"$_\"line"; } -- cgit v1.2.1