diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2003-10-20 15:22:35 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2003-10-20 15:22:35 +0000 |
commit | 9019b937fb749673a02f983f7d103946caf9567f (patch) | |
tree | 904db1838be9f0d00a0d5359ea178634d7cf0696 /perl-install/standalone/drakperm | |
parent | 3fde3164488e9597a6e2ddc156f9d62d1ac288e5 (diff) | |
download | drakx-backup-do-not-use-9019b937fb749673a02f983f7d103946caf9567f.tar drakx-backup-do-not-use-9019b937fb749673a02f983f7d103946caf9567f.tar.gz drakx-backup-do-not-use-9019b937fb749673a02f983f7d103946caf9567f.tar.bz2 drakx-backup-do-not-use-9019b937fb749673a02f983f7d103946caf9567f.tar.xz drakx-backup-do-not-use-9019b937fb749673a02f983f7d103946caf9567f.zip |
perform test once and move it out of the save loop
Diffstat (limited to 'perl-install/standalone/drakperm')
-rwxr-xr-x | perl-install/standalone/drakperm | 6 |
1 files changed, 3 insertions, 3 deletions
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 (<F>) { 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"; } |