Commit 3f55579d authored by Patrick's avatar Patrick Committed by Brad King
Browse files

SystemTools: Fix FileExists for some SCO OpenServer file permissions

Take changes used by pkgsrc [1]:

* SCO OpenServer 5.0.7/3.2's command has 711 permission.

[1] http://cdn.netbsd.org/pub/pkgsrc/current/pkgsrc/devel/cmake/patches/

Change-Id: Ib9fd7611e2c0b3e10a75b2322c002a8cb266ea89
parent 2ce319a6
......@@ -1320,9 +1320,14 @@ bool SystemTools::FileExists(const std::string& filename)
return (GetFileAttributesW(
SystemTools::ConvertToWindowsExtendedPath(filename).c_str())
!= INVALID_FILE_ATTRIBUTES);
#else
// SCO OpenServer 5.0.7/3.2's command has 711 permission.
#if defined(_SCO_DS)
return access(filename.c_str(), F_OK) == 0;
#else
return access(filename.c_str(), R_OK) == 0;
#endif
#endif
}
//----------------------------------------------------------------------------
......
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