diff options
author | Brad King <brad.king@kitware.com> | 2009-02-09 14:23:13 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-02-09 14:23:13 (GMT) |
commit | ca096a4596c8993cbadd5fc6e612ac349db6355c (patch) | |
tree | e3a790958302b8c513958acff79ee0e16e75b9d1 /Source/kwsys/SystemTools.hxx.in | |
parent | 67ddd0c837172760c62850a8893eec74d416147e (diff) | |
download | CMake-ca096a4596c8993cbadd5fc6e612ac349db6355c.zip CMake-ca096a4596c8993cbadd5fc6e612ac349db6355c.tar.gz CMake-ca096a4596c8993cbadd5fc6e612ac349db6355c.tar.bz2 |
BUG: Fix GetRealPath when realpath fails
This patch from Philip Lowman teaches SystemTools::GetRealPath to deal
with paths that do not exist by dealing with the case that realpath
returns NULL. See issue #8423.
Diffstat (limited to 'Source/kwsys/SystemTools.hxx.in')
-rw-r--r-- | Source/kwsys/SystemTools.hxx.in | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/kwsys/SystemTools.hxx.in b/Source/kwsys/SystemTools.hxx.in index b092764..07118c2 100644 --- a/Source/kwsys/SystemTools.hxx.in +++ b/Source/kwsys/SystemTools.hxx.in @@ -351,7 +351,9 @@ public: const char* in_base); /** - * Get the real path for a given path, removing all symlinks. + * Get the real path for a given path, removing all symlinks. In + * the event of an error (non-existent path, permissions issue, + * etc.) the original path is returned. */ static kwsys_stl::string GetRealPath(const char* path); |