Commit 6ce256b6 authored by jclamber's avatar jclamber

fix bug on list of ramses causing to many open files

git-svn-id: http://svn.oamp.fr/repos/unsio/trunk@219 ce2cc22f-6084-46ce-a062-084b172ee5dc
parent 21b9c9f7
......@@ -66,6 +66,8 @@ CAmr::CAmr(const std::string _indir, const bool _v)
//
CAmr::~CAmr()
{
amr.close();
hydro.close();
}
// ----------------------------------------------------------------------------
//
......
......@@ -57,7 +57,7 @@ CPart::CPart(const std::string _indir, const bool _v)
// Destructor
CPart::~CPart()
{
part.close();
}
// ----------------------------------------------------------------------------
//
......
......@@ -22,7 +22,8 @@
namespace tools {
// ----------------------------------------------------------------------------
// isFileExist
// isFileExist:
// check if file exist
bool Ctools::isFileExist(std::string _file)
{
bool status=false;
......@@ -35,12 +36,15 @@ bool Ctools::isFileExist(std::string _file)
return status;
}
// ----------------------------------------------------------------------------
// isFileExist
// isDirectory
// check if directory exist
bool Ctools::isDirectory(std::string _dir)
{
bool status=false;
if (opendir(_dir.c_str())) {
DIR * p = opendir(_dir.c_str());
if (p) {
status=true;
closedir(p);
}
return status;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment