Merge a tweak from Tat to keep Mac 10.5 from crashing on realpath

This commit is contained in:
James Turner
2012-05-30 11:08:11 +01:00
parent 950af5375c
commit edbea633f3

View File

@@ -485,8 +485,11 @@ bool SGPath::rename(const SGPath& newName)
std::string SGPath::realpath() const
{
#ifdef _WIN32
#if defined(_WIN32) || (defined(__APPLE__) && MAC_OS_X_VERSION_MAX_ALLOWED <= 1050)
// Not implemented for Windows yet. Return original path instead.
// Workaround for Mac OS 10.5. Somehow fgfs crashes on Mac at ::realpath.
// simply returning path works on Mac since absolute path is passed from the GUI launcher
return path;
#else
char* buf = ::realpath(path.c_str(), NULL);