summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/SystemTools.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/kwsys/SystemTools.cxx')
-rw-r--r--Source/kwsys/SystemTools.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx
index f5c4507..157ea55 100644
--- a/Source/kwsys/SystemTools.cxx
+++ b/Source/kwsys/SystemTools.cxx
@@ -2044,7 +2044,11 @@ kwsys_stl::string SystemTools
bool SystemTools::FileIsDirectory(const char* name)
{
struct stat fs;
+#if _WIN32
if(stat(name, &fs) == 0)
+#else
+ if(lstat(name, &fs) == 0)
+#endif
{
#if _WIN32
return ((fs.st_mode & _S_IFDIR) != 0);