aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/build.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore/build.cc')
-rw-r--r--src/libstore/build.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index fd104dffd..4c03da3e2 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -1211,10 +1211,16 @@ void DerivationGoal::computeClosure()
}
+static string drvsLogDir = "drvs";
+
+
void DerivationGoal::openLogFile()
{
/* Create a log file. */
- Path logFileName = nixLogDir + "/drvs/" + baseNameOf(drvPath);
+ Path dir = (format("%1%/%2%") % nixLogDir % drvsLogDir).str();
+ createDirs(dir);
+
+ Path logFileName = (format("%1%/%2%") % dir % baseNameOf(drvPath)).str();
fdLogFile = open(logFileName.c_str(),
O_CREAT | O_WRONLY | O_TRUNC, 0666);
if (fdLogFile == -1)