summaryrefslogtreecommitdiffstats
path: root/lib/DebugDump/DebugDump.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/DebugDump/DebugDump.cpp')
-rw-r--r--lib/DebugDump/DebugDump.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/DebugDump/DebugDump.cpp b/lib/DebugDump/DebugDump.cpp
index 4e3c667..e35ec4d 100644
--- a/lib/DebugDump/DebugDump.cpp
+++ b/lib/DebugDump/DebugDump.cpp
@@ -39,7 +39,7 @@ CDebugDump::CDebugDump() :
void CDebugDump::Open(const std::string& pDir)
{
m_sDebugDumpDir = pDir;
- if (!Exist(pDir))
+ if (!ExistFileDir(pDir))
{
throw "CDebugDump::CDebugDump(): "+pDir+" does not exist.";
}
@@ -47,6 +47,13 @@ void CDebugDump::Open(const std::string& pDir)
bool CDebugDump::Exist(const std::string& pPath)
{
+ std::string fullPath = m_sDebugDumpDir + "/" + pPath;
+ return ExistFileDir(fullPath);
+}
+
+
+bool CDebugDump::ExistFileDir(const std::string& pPath)
+{
struct stat buf;
if (stat(pPath.c_str(), &buf) == 0)
{
@@ -66,11 +73,12 @@ void CDebugDump::Create(const std::string& pDir)
{
throw "CDebugDump::Create(): Cannot create dir: " + pDir;
}
+ SaveEnvironment();
}
void CDebugDump::Delete(const std::string& pDir)
{
- if (!Exist(pDir))
+ if (!ExistFileDir(pDir))
{
return;
}