BUG: fix full path for file in current directory

This commit is contained in:
Bill Hoffman 2001-09-29 11:12:17 -04:00
parent f6b3049bda
commit f69e3caa14
1 changed files with 9 additions and 2 deletions

View File

@ -1205,8 +1205,15 @@ std::string cmSystemTools::CollapseFullPath(const char* in_name)
char resolved_name[5024]; char resolved_name[5024];
# endif # endif
# endif # endif
realpath(dir.c_str(), resolved_name); if(dir != "")
dir = resolved_name; {
realpath(dir.c_str(), resolved_name);
dir = resolved_name;
}
else
{
dir = cmSystemTools::GetCurrentWorkingDirectory();
}
return dir + "/" + file; return dir + "/" + file;
#endif #endif
} }