summaryrefslogtreecommitdiffstats
path: root/Source/CTest
diff options
context:
space:
mode:
authorscivision <scivision@users.noreply.github.com>2023-09-19 03:11:15 (GMT)
committerscivision <scivision@users.noreply.github.com>2023-09-19 03:11:28 (GMT)
commitd49ea4a4d9d2efaa1321b224931ca0e5fea1cade (patch)
tree9e36f22b84f2be1aadd1af0984d6f2a62ddab2bf /Source/CTest
parentf5ff17fcf29170541805e7fc7f4a74252fe39b10 (diff)
downloadCMake-d49ea4a4d9d2efaa1321b224931ca0e5fea1cade.zip
CMake-d49ea4a4d9d2efaa1321b224931ca0e5fea1cade.tar.gz
CMake-d49ea4a4d9d2efaa1321b224931ca0e5fea1cade.tar.bz2
Source: Remove redundant FileIsDirectory checks
Diffstat (limited to 'Source/CTest')
-rw-r--r--Source/CTest/cmCTestTestHandler.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index e4b9239..eb3b4dd 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -1711,8 +1711,7 @@ std::string cmCTestTestHandler::FindExecutable(
// now look in the paths we specified above
for (unsigned int ai = 0; ai < attempted.size() && fullPath.empty(); ++ai) {
// first check without exe extension
- if (cmSystemTools::FileExists(attempted[ai]) &&
- !cmSystemTools::FileIsDirectory(attempted[ai])) {
+ if (cmSystemTools::FileExists(attempted[ai], true)) {
fullPath = cmSystemTools::CollapseFullPath(attempted[ai]);
resultingConfig = attemptedConfigs[ai];
}
@@ -1721,8 +1720,7 @@ std::string cmCTestTestHandler::FindExecutable(
failed.push_back(attempted[ai]);
tempPath =
cmStrCat(attempted[ai], cmSystemTools::GetExecutableExtension());
- if (cmSystemTools::FileExists(tempPath) &&
- !cmSystemTools::FileIsDirectory(tempPath)) {
+ if (cmSystemTools::FileExists(tempPath, true)) {
fullPath = cmSystemTools::CollapseFullPath(tempPath);
resultingConfig = attemptedConfigs[ai];
} else {