Commit e798e567 authored by Brad King's avatar Brad King Committed by Kitware Robot
Browse files

Merge topic 'SystemTools-FileIsExecutable-windows'

41700ca4

 SystemTools: Fix FileIsExecutable on Windows
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !179
parents caff9c3b 41700ca4
...@@ -3010,7 +3010,11 @@ bool SystemTools::FileIsDirectory(const std::string& inName) ...@@ -3010,7 +3010,11 @@ bool SystemTools::FileIsDirectory(const std::string& inName)
bool SystemTools::FileIsExecutable(const std::string& name) bool SystemTools::FileIsExecutable(const std::string& name)
{ {
#if defined(_WIN32)
return SystemTools::FileExists(name, true);
#else
return !FileIsDirectory(name) && TestFileAccess(name, TEST_FILE_EXECUTE); return !FileIsDirectory(name) && TestFileAccess(name, TEST_FILE_EXECUTE);
#endif
} }
bool SystemTools::FileIsSymlink(const std::string& name) bool SystemTools::FileIsSymlink(const std::string& name)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment