aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/util.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2008-06-09 13:52:45 +0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2008-06-09 13:52:45 +0000
commitb0e92f6d474ce91d7f071f9ed62bbb2015009c58 (patch)
treec3d28be6b89dfa618df290d5c78c55897b119b6c /src/libutil/util.cc
parent4ed01ed791b3bb7a4010049c6128aa2d49a81a29 (diff)
* Merged the no-bdb branch (-r10900:HEAD
https://svn.nixos.org/repos/nix/nix/branches/no-bdb).
Diffstat (limited to 'src/libutil/util.cc')
-rw-r--r--src/libutil/util.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libutil/util.cc b/src/libutil/util.cc
index f978856a9..e18f9841f 100644
--- a/src/libutil/util.cc
+++ b/src/libutil/util.cc
@@ -361,9 +361,10 @@ Path createTempDir(const Path & tmpRoot, const Path & prefix,
Paths createDirs(const Path & path)
{
- if (path == "/") return Paths();
- Paths created = createDirs(dirOf(path));
+ Paths created;
+ if (path == "/") return created;
if (!pathExists(path)) {
+ created = createDirs(dirOf(path));
if (mkdir(path.c_str(), 0777) == -1)
throw SysError(format("creating directory `%1%'") % path);
created.push_back(path);