summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2010-07-10 17:22:22 +0000
committerNorbert Preining <preining@logic.at>2010-07-10 17:22:22 +0000
commit6903261693b52a11463095097d8dc8909b112cfe (patch)
tree99663f5c00807db5aa43b9f654387b63bfff0d6f
parent06b11b65ef42413157e49e22f28bd40391efddd9 (diff)
TLConfFile: create missing dirs at conf file saving if they do not exist
git-svn-id: svn://tug.org/texlive/trunk@19354 c570f23f-e606-0410-a88d-b1316a301751
-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;