mirror of
https://github.com/NixOS/nix
synced 2025-06-27 04:21:16 +02:00
* GCC 4.3.0 (Fedora 9) compatibility fixes. Reported by Gour and
Armijn Hemel.
This commit is contained in:
parent
9819bb20da
commit
bd955e15e1
11 changed files with 18 additions and 3 deletions
|
@ -7,6 +7,7 @@
|
|||
#include <iostream>
|
||||
#include <cerrno>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <sstream>
|
||||
#include <cstring>
|
||||
|
||||
|
@ -529,13 +530,14 @@ AutoDelete::AutoDelete(const string & p, bool recursive) : path(p)
|
|||
AutoDelete::~AutoDelete()
|
||||
{
|
||||
try {
|
||||
if (del)
|
||||
if (del) {
|
||||
if (recursive)
|
||||
deletePath(path);
|
||||
else {
|
||||
if (remove(path.c_str()) == -1)
|
||||
throw SysError(format("cannot unlink `%1%'") % path);
|
||||
}
|
||||
}
|
||||
} catch (...) {
|
||||
ignoreException();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue