Source: Remove redundant FileIsDirectory checks

This commit is contained in:
scivision
2023-09-18 23:11:15 -04:00
parent f5ff17fcf2
commit d49ea4a4d9
4 changed files with 6 additions and 12 deletions
+2 -4
View File
@@ -414,8 +414,7 @@ protected:
path += "/";
}
path += fname;
if (cmSystemTools::FileExists(path, true) &&
!cmSystemTools::FileIsDirectory(path)) {
if (cmSystemTools::FileExists(path, true)) {
std::string fp = cmSystemTools::CollapseFullPath(path);
this->DirectoryToFileToPathMap[extraPath][fname] = fp;
return fp;
@@ -428,8 +427,7 @@ protected:
path = path + "/";
}
path = path + fname;
if (cmSystemTools::FileExists(path, true) &&
!cmSystemTools::FileIsDirectory(path)) {
if (cmSystemTools::FileExists(path, true)) {
std::string fp = cmSystemTools::CollapseFullPath(path);
this->DirectoryToFileToPathMap[extraPath][fname] = fp;
return fp;