File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -223,15 +223,15 @@ bool Path::isHeader(const std::string &path)
223223std::string Path::getAbsoluteFilePath (const std::string& filePath)
224224{
225225 std::string absolute_path;
226- #if defined(__linux__) || defined(__sun) || defined(__hpux) || defined(__GNUC__)
226+ #ifdef _WIN32
227+ char absolute[_MAX_PATH];
228+ if (_fullpath (absolute, filePath.c_str (), _MAX_PATH))
229+ absolute_path = absolute;
230+ #elif defined(__linux__) || defined(__sun) || defined(__hpux) || defined(__GNUC__)
227231 char * absolute = realpath (filePath.c_str (), NULL );
228232 if (absolute)
229233 absolute_path = absolute;
230234 free (absolute);
231- #elif defined(_WIN32)
232- char absolute[_MAX_PATH];
233- if (_fullpath (absolute, filePath.c_str (), _MAX_PATH))
234- absolute_path = absolute;
235235#else
236236#error Platform absolute path function needed
237237#endif
You can’t perform that action at this time.
0 commit comments