diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2006-04-27 21:52:45 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2006-04-27 21:52:45 (GMT) |
commit | 4c93b9a158fad39c262fb6f5618a07a5341b98dd (patch) | |
tree | dde8bf053c2b98c2d775e2698f4f5abceba6d133 /Source | |
parent | dc304cfdec774a26486272f43080098eee293ca7 (diff) | |
download | CMake-4c93b9a158fad39c262fb6f5618a07a5341b98dd.zip CMake-4c93b9a158fad39c262fb6f5618a07a5341b98dd.tar.gz CMake-4c93b9a158fad39c262fb6f5618a07a5341b98dd.tar.bz2 |
ENH: put the fix back in with abort
Diffstat (limited to 'Source')
-rw-r--r-- | Source/kwsys/SystemTools.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx index 5743492..89ccd6d 100644 --- a/Source/kwsys/SystemTools.cxx +++ b/Source/kwsys/SystemTools.cxx @@ -118,9 +118,14 @@ inline int Rmdir(const char* dir) } inline const char* Getcwd(char* buf, unsigned int len) { - return _getcwd(buf, len); + const char* ret = _getcwd(buf, len); + if(!ret) + { + fprintf(stderr, "No current working directory.\n"); + abort(); + } + return ret; } - inline int Chdir(const char* dir) { #if defined(__BORLANDC__) |