mirror of
https://github.com/NixOS/nix
synced 2025-06-27 16:51:15 +02:00
* Merged the no-bdb branch (-r10900:HEAD
https://svn.nixos.org/repos/nix/nix/branches/no-bdb).
This commit is contained in:
parent
4ed01ed791
commit
b0e92f6d47
24 changed files with 923 additions and 739 deletions
|
@ -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);
|
||||
|
|
|
@ -12,6 +12,10 @@
|
|||
namespace nix {
|
||||
|
||||
|
||||
#define foreach(it_type, it, collection) \
|
||||
for (it_type it = collection.begin(); it != collection.end(); ++it)
|
||||
|
||||
|
||||
/* Return an environment variable. */
|
||||
string getEnv(const string & key, const string & def = "");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue