summaryrefslogtreecommitdiff
path: root/Master/tlpkg/TeXLive/TLUtils.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/TeXLive/TLUtils.pm')
-rw-r--r--Master/tlpkg/TeXLive/TLUtils.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm
index 65a60dfde6e..9b4f995e87b 100644
--- a/Master/tlpkg/TeXLive/TLUtils.pm
+++ b/Master/tlpkg/TeXLive/TLUtils.pm
@@ -2692,8 +2692,12 @@ sub check_for_old_updmap_cfg {
return unless -r $oldupd; # if no such file, good.
open (OLDUPD, "<$oldupd") || die "open($oldupd) failed: $!";
- chomp( my $firstline = <OLDUPD> );
+ my $firstline = <OLDUPD>;
close(OLDUPD);
+ # cygwin returns undef when reading from an empty file, we have
+ # to make sure that this is anyway initialized
+ $firstline = "" if (!defined($firstline));
+ chomp ($firstline);
#
if ($firstline =~ m/^# Generated by (install-tl|.*\/tlmgr) on/) {
# assume it was our doing, rename it.