summaryrefslogtreecommitdiff
path: root/Master/tlpkg/TeXLive
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/TeXLive')
-rw-r--r--Master/tlpkg/TeXLive/TLWinGoo.pm22
1 files changed, 20 insertions, 2 deletions
diff --git a/Master/tlpkg/TeXLive/TLWinGoo.pm b/Master/tlpkg/TeXLive/TLWinGoo.pm
index 52a0233a39a..35e933780e4 100644
--- a/Master/tlpkg/TeXLive/TLWinGoo.pm
+++ b/Master/tlpkg/TeXLive/TLWinGoo.pm
@@ -593,17 +593,24 @@ sub register_extension {
my $file_type = shift;
debug("Linking $extension to $file_type\n");
my ($classes_key_path, $classes_key, $k);
+ my ($admin_classes_key_path, $admin_classes_key);
$extension = lc($extension);
if ($is_admin) {
$classes_key_path = "LMachine/Software/Classes/";
} else {
$classes_key_path = "CUser/Software/Classes/";
+ $admin_classes_key_path = "LMachine/Software/Classes/";
}
$classes_key = $Registry -> Open($classes_key_path,
{Access => KEY_ALL_ACCESS()});
+ if (!$is_admin) {
+ $admin_classes_key = $Registry -> Open($admin_classes_key_path,
+ {Access => KEY_READ()});
+ }
+
if (!defined($classes_key)) {
tlwarn("Cannot get key to $classes_key\n" .
"Cannot continue setting up associations.\n");
@@ -627,8 +634,19 @@ sub register_extension {
}
}
} else {
- debug("register_extension: old key $extension not found, recreating it\n");
- $do_create_key = 1;
+ if (!$is_admin) {
+ # if we are not admin, we check whether the key is associated
+ # in the admin keys, and if yes, do NOT associate it again
+ if (defined($admin_classes_key->{$extension})) {
+ debug("register_extension: old key $extension found in admins keys, not changing it\n");
+ } else {
+ $do_create_key = 1;
+ }
+ } else {
+ $do_create_key = 1;
+ }
+ debug("register_extension: old key $extension not found, recreating it\n")
+ if $do_create_key;
}
} elsif ($mode == 2) {
$do_create_key = 1;