diff options
Diffstat (limited to 'Source/kwsys/Directory.cxx')
-rw-r--r-- | Source/kwsys/Directory.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/kwsys/Directory.cxx b/Source/kwsys/Directory.cxx index 727e61a..f3e302f 100644 --- a/Source/kwsys/Directory.cxx +++ b/Source/kwsys/Directory.cxx @@ -76,6 +76,13 @@ const char* Directory::GetPath() const return this->Internal->Path.c_str(); } +//---------------------------------------------------------------------------- +void Directory::Clear() +{ + this->Internal->Path.clear(); + this->Internal->Files.clear(); +} + } // namespace KWSYS_NAMESPACE // First microsoft compilers @@ -96,6 +103,7 @@ namespace KWSYS_NAMESPACE bool Directory::Load(const char* name) { + this->Clear(); #if _MSC_VER < 1300 long srchHandle; #else @@ -148,6 +156,7 @@ namespace KWSYS_NAMESPACE bool Directory::Load(const char* name) { + this->Clear(); DIR* dir = opendir(name); if (!dir) |