Clean up temp roots in a more C++ way

This commit is contained in:
Eelco Dolstra 2014-11-19 17:07:29 +01:00
parent ed306febb5
commit 1256ab3b44
3 changed files with 13 additions and 26 deletions

View file

@ -363,6 +363,15 @@ LocalStore::~LocalStore()
} catch (...) {
ignoreException();
}
try {
if (fdTempRoots != -1) {
fdTempRoots.close();
unlink(fnTempRoots.c_str());
}
} catch (...) {
ignoreException();
}
}