summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2001-09-29 15:12:17 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2001-09-29 15:12:17 (GMT)
commitf69e3caa1411790d3a6a37b387c26532e78bab7b (patch)
treec9c527702419d6433cdb2d75d8157d4a544cbfef /Source
parentf6b3049bdaa3ccf36ce025d28511f01d81433198 (diff)
downloadCMake-f69e3caa1411790d3a6a37b387c26532e78bab7b.zip
CMake-f69e3caa1411790d3a6a37b387c26532e78bab7b.tar.gz
CMake-f69e3caa1411790d3a6a37b387c26532e78bab7b.tar.bz2
BUG: fix full path for file in current directory
Diffstat (limited to 'Source')
-rw-r--r--Source/cmSystemTools.cxx11
1 files changed, 9 insertions, 2 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 6982dda..0e5c81e 100644
--- a/Source/cmSystemTools.cxx
+++ b/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
}