From 82b3ed83d4cef6105afe4bee645e61991836509e Mon Sep 17 00:00:00 2001 From: Ken Martin Date: Thu, 6 Dec 2001 16:50:54 -0500 Subject: [PATCH] handle tildas --- Source/cmSystemTools.cxx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 903e31c20..c896ca879 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -486,6 +486,16 @@ const char *cmSystemTools::ConvertToUnixSlashes(std::string& path) { path = path.substr(0, path.size()-1); } + + // if there is a tilda ~ then replace it with HOME + if(path.find("~") == 0) + { + if (getenv("HOME")) + { + path = std::string(getenv("HOME")) + path.substr(1); + } + } + // if there is a /tmp_mnt in a path get rid of it! // stupid sgi's if(path.find("/tmp_mnt") == 0)