Skip to content
Snippets Groups Projects
Commit 2c2f6604 authored by Ben Boeckel's avatar Ben Boeckel Committed by Ben Boeckel
Browse files

SystemTools: Accept strings in IsSubDirectory

The arguments are assumed to be non-null.

Change-Id: Ibe8e9fc9c932efc55cc18f0e06b2db61bc168817
parent 153f6df7
No related branches found
No related tags found
No related merge requests found
......@@ -4335,9 +4335,9 @@ kwsys_stl::string SystemTools::GetParentDirectory(const char* fileOrDir)
return SystemTools::GetFilenamePath(fileOrDir);
}
bool SystemTools::IsSubDirectory(const char* cSubdir, const char* cDir)
bool SystemTools::IsSubDirectory(const kwsys_stl::string& cSubdir, const kwsys_stl::string& cDir)
{
if(!*cDir)
if(cDir.empty())
{
return false;
}
......
......@@ -487,7 +487,7 @@ public:
/**
* Check if the given file or directory is in subdirectory of dir
*/
static bool IsSubDirectory(const char* fileOrDir, const char* dir);
static bool IsSubDirectory(const kwsys_stl::string& fileOrDir, const kwsys_stl::string& dir);
/** -----------------------------------------------------------------
* File Manipulation Routines
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment