diff --git a/SystemTools.cxx b/SystemTools.cxx index 6e2ccbe3b0adff4e1d708f2b7c6f5ee6e7c335f9..2bb4450d267d09a8320529d40cb820323b4c231c 100644 --- a/SystemTools.cxx +++ b/SystemTools.cxx @@ -205,6 +205,10 @@ inline void Realpath(const char *path, kwsys_stl::string & resolved_path) resolved_path = fullpath; KWSYS_NAMESPACE::SystemTools::ConvertToUnixSlashes(resolved_path); } + else + { + resolved_path = path; + } } #else #include <sys/types.h> @@ -237,8 +241,16 @@ inline void Realpath(const char *path, kwsys_stl::string & resolved_path) { char resolved_name[KWSYS_SYSTEMTOOLS_MAXPATH]; - realpath(path, resolved_name); - resolved_path = resolved_name; + char *ret = realpath(path, resolved_name); + if(ret) + { + resolved_path = ret; + } + else + { + // if path resolution fails, return what was passed in + resolved_path = path; + } } #endif diff --git a/SystemTools.hxx.in b/SystemTools.hxx.in index 487050c54ea5264b9517b8afd811695a095b9d4a..585e488c30042c06ca8c2de16c330278677ad28f 100644 --- a/SystemTools.hxx.in +++ b/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); diff --git a/kwsysDateStamp.cmake b/kwsysDateStamp.cmake index 71f906f5938b8707b3fa6f3775460c6a17dcf328..bf379bc89826b2066100cb00585625b8335fa44c 100644 --- a/kwsysDateStamp.cmake +++ b/kwsysDateStamp.cmake @@ -7,4 +7,4 @@ SET(KWSYS_DATE_STAMP_YEAR 2009) SET(KWSYS_DATE_STAMP_MONTH 02) # KWSys version date day component. Format is DD. -SET(KWSYS_DATE_STAMP_DAY 03) +SET(KWSYS_DATE_STAMP_DAY 09)