texlive[44059] Master/tlpkg/TeXLive/TLWinGoo.pm: Windows only new
commits+siepo at tug.org
commits+siepo at tug.org
Wed Apr 26 16:08:46 CEST 2017
Revision: 44059
http://tug.org/svn/texlive?view=revision&revision=44059
Author: siepo
Date: 2017-04-26 16:08:46 +0200 (Wed, 26 Apr 2017)
Log Message:
-----------
Windows only new filetypes: take other read failures into account, Take 2
Modified Paths:
--------------
trunk/Master/tlpkg/TeXLive/TLWinGoo.pm
Modified: trunk/Master/tlpkg/TeXLive/TLWinGoo.pm
===================================================================
--- trunk/Master/tlpkg/TeXLive/TLWinGoo.pm 2017-04-26 11:27:52 UTC (rev 44058)
+++ trunk/Master/tlpkg/TeXLive/TLWinGoo.pm 2017-04-26 14:08:46 UTC (rev 44059)
@@ -913,7 +913,7 @@
my $regkey;
my $old_file_type = current_filetype($extension);
- if ($old_file_type) {
+ if ($old_file_type and $old_file_type ne $reg_unknown) {
if ($is_admin) {
if (not lm_root()->{"Software/Classes/$old_file_type/"}) {
$old_file_type = "";
@@ -927,16 +927,20 @@
}
# admin: whether to remove HKCU entry. admin never _writes_ to HKCU
my $remove_cu = ($mode == 2) && admin();
+
# can do the following safely:
debug ("Adding $file_type to OpenWithProgIds of $extension\n");
add_to_progids ($extension, $file_type);
+
if ($old_file_type and $old_file_type ne $file_type) {
if ($mode == 1) {
debug ("Not overwriting $old_file_type with $file_type for $extension\n");
- } else {
+ } else { # $mode ==2, overwrite
debug("Linking $extension to $file_type\n");
- debug ("Moving $old_file_type to OpenWithProgIds\n");
- add_to_progids ($extension, $old_file_type);
+ if ($old_file_type ne $reg_unknown) {
+ debug ("Moving $old_file_type to OpenWithProgIds\n");
+ add_to_progids ($extension, $old_file_type);
+ }
$regkey = {'/' => $file_type};
do_write_regkey("Software/Classes/$extension/", $regkey, $remove_cu);
}
More information about the tex-live-commits
mailing list