Commit 4db8e69f authored by Sebastian Schuberth's avatar Sebastian Schuberth Committed by Brad King
Browse files

SystemTools: Implement FileIsSymlink on Windows

Change-Id: Iddfc4048d412ea9ecf1546802d6faca645c7ff36
parent 6d83c113
......@@ -3198,8 +3198,16 @@ bool SystemTools::FileIsDirectory(const kwsys_stl::string& inName)
bool SystemTools::FileIsSymlink(const kwsys_stl::string& name)
{
#if defined( _WIN32 )
(void)name;
return false;
DWORD attr = GetFileAttributesW(
SystemTools::ConvertToWindowsExtendedPath(name).c_str());
if (attr != INVALID_FILE_ATTRIBUTES)
{
return (attr & FILE_ATTRIBUTE_REPARSE_POINT) != 0;
}
else
{
return false;
}
#else
struct stat fs;
if(lstat(name.c_str(), &fs) == 0)
......
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