handle tildas
This commit is contained in:
parent
4372a40922
commit
82b3ed83d4
|
@ -486,6 +486,16 @@ const char *cmSystemTools::ConvertToUnixSlashes(std::string& path)
|
||||||
{
|
{
|
||||||
path = path.substr(0, path.size()-1);
|
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!
|
// if there is a /tmp_mnt in a path get rid of it!
|
||||||
// stupid sgi's
|
// stupid sgi's
|
||||||
if(path.find("/tmp_mnt") == 0)
|
if(path.find("/tmp_mnt") == 0)
|
||||||
|
|
Loading…
Reference in New Issue