summaryrefslogtreecommitdiff
path: root/Master/tlpkg/TeXLive/TLUtils.pm
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2009-07-05 01:06:47 +0000
committerNorbert Preining <preining@logic.at>2009-07-05 01:06:47 +0000
commit79364908545806a2e80af2e511bb9982df9c7306 (patch)
treec985ebb3baff1e43b52c290726ed7e5d6b9674ac /Master/tlpkg/TeXLive/TLUtils.pm
parent657ba4f783aa9b76181bda011b4eef594e7193fa (diff)
postaction fileassocs: we work now in three modes depending on the setting
of option("fileassocs"): - == 0 : do not fiddle with fileassocs (but still add/remove filetype!) - == 1 : do only add/remove if it is the one we created - == 2 : always recreate the the fileassocs TLConfig.pm: chnage the type of the fileassoc parameter to n:0..2 git-svn-id: svn://tug.org/texlive/trunk@14103 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/TeXLive/TLUtils.pm')
-rw-r--r--Master/tlpkg/TeXLive/TLUtils.pm10
1 files changed, 5 insertions, 5 deletions
diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm
index d39dd00c682..54650559440 100644
--- a/Master/tlpkg/TeXLive/TLUtils.pm
+++ b/Master/tlpkg/TeXLive/TLUtils.pm
@@ -1400,8 +1400,8 @@ sub do_postaction {
next unless $do_fileassocs;
$ret &&= _do_postaction_filetype($how, $tlpobj, $1);
} elsif ($pa =~ m/\s*fileassoc\s+(.*)\s*$/) {
- next unless $do_fileassocs;
- $ret &&= _do_postaction_fileassoc($how, $tlpobj, $1);
+ $ret &&= _do_postaction_fileassoc($how, $do_fileassocs, $tlpobj, $1);
+ next;
} elsif ($pa =~ m/\s*script\s+(.*)\s*$/) {
next unless $do_script;
$ret &&= _do_postaction_script($how, $tlpobj, $1);
@@ -1415,7 +1415,7 @@ sub do_postaction {
}
sub _do_postaction_fileassoc {
- my ($how, $tlpobj, $pa) = @_;
+ my ($how, $mode, $tlpobj, $pa) = @_;
return 1 unless win32();
my ($errors, %keyval) =
parse_into_keywords($pa, qw/extension filetype/);
@@ -1442,9 +1442,9 @@ sub _do_postaction_fileassoc {
&log("postaction $how fileassoc for " . $tlpobj->name .
": $extension, $filetype\n");
if ($how eq "install") {
- TeXLive::TLWinGoo::register_extension($extension, $filetype);
+ TeXLive::TLWinGoo::register_extension($mode, $extension, $filetype);
} elsif ($how eq "remove") {
- TeXLive::TLWinGoo::unregister_extension($extension);
+ TeXLive::TLWinGoo::unregister_extension($mode, $extension, $filetype);
} else {
tlwarn("Unknown mode $how\n");
return 0;