summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/tlpkg/TeXLive/TLConfFile.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/Master/tlpkg/TeXLive/TLConfFile.pm b/Master/tlpkg/TeXLive/TLConfFile.pm
index ca6204987dc..2049b4c85bc 100644
--- a/Master/tlpkg/TeXLive/TLConfFile.pm
+++ b/Master/tlpkg/TeXLive/TLConfFile.pm
@@ -146,6 +146,8 @@ sub save
my $fhout;
if (!defined($out)) {
$out = $config{'file'};
+ my $dn = TeXLive::TLUtils::dirname($out);
+ TeXLive::TLUtils::mkdirhier($dn);
if (!open(CFG, ">$out")) {
tlwarn("Cannot write to $out: $!\n");
return 0;
@@ -156,6 +158,8 @@ sub save
# check what we got there for $out
if (ref($out) eq 'SCALAR') {
# that is a file name
+ my $dn = TeXLive::TLUtils::dirname($out);
+ TeXLive::TLUtils::mkdirhier($dn);
if (!open(CFG, ">$out")) {
tlwarn("Cannot write to $out: $!\n");
return 0;