summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2003-03-03 09:06:29 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2003-03-03 09:06:29 +0000
commit10be1b164d2ee27786f8dc8e38f1d7e8dd77fa62 (patch)
tree9ce30e9f814d1493ec5ee4c96966338cb381cf0c
parentae55a399080beba98b5f9d4caa9c227ef9ce80d0 (diff)
downloaddrakx-10be1b164d2ee27786f8dc8e38f1d7e8dd77fa62.tar
drakx-10be1b164d2ee27786f8dc8e38f1d7e8dd77fa62.tar.gz
drakx-10be1b164d2ee27786f8dc8e38f1d7e8dd77fa62.tar.bz2
drakx-10be1b164d2ee27786f8dc8e38f1d7e8dd77fa62.tar.xz
drakx-10be1b164d2ee27786f8dc8e38f1d7e8dd77fa62.zip
fix bug reported by Cédric Thévenet (impossible to save newly edited rules)
-rwxr-xr-xperl-install/standalone/drakperm14
1 files changed, 9 insertions, 5 deletions
diff --git a/perl-install/standalone/drakperm b/perl-install/standalone/drakperm
index d0feb3aec..02bbf23a9 100755
--- a/perl-install/standalone/drakperm
+++ b/perl-install/standalone/drakperm
@@ -181,12 +181,16 @@ sub display_perm {
sub save_perm {
$modified or return 0;
+ my $val;
local *F;
- open F, '>'.$local_path.'perm.local' or die("F CHIER BORDEL");
- foreach my $i (0..$rows_cnt) {
- my $line = $permList->get_text($i, 0) . "\t" . $permList->get_text($i,1) . ($permList->get_text($i,2) ? "." . $permList->get_text($i,2) : "") . "\t" . $permList->get_text($i,3) . "\n";
- print F $line;
- }
+ open F, '>'.$local_path.'perm.local' or die("Impssible to process \"", $local_path, "perm.local\"");
+ $treeModel->foreach(sub {
+ my ($model, $_path, $iter) = @_;
+ my $module = $model->get($iter, 0);
+ my $line = $model->get($iter, 0) . "\t" . $model->get($iter,1) . ($model->get($iter,2) ? "." . $model->get($iter,2) : "") . "\t" . $model->get($iter,3) . "\n";
+ print F $line;
+ return 0;
+ }, $val);
close F;
$modified = 0;
}