Browse Source

BUG: fix full path for file in current directory

Bill Hoffman 24 years ago
parent
commit
f69e3caa14
1 changed files with 9 additions and 2 deletions
  1. 9 2
      Source/cmSystemTools.cxx

+ 9 - 2
Source/cmSystemTools.cxx

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