summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/SystemTools.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/kwsys/SystemTools.cxx')
-rw-r--r--Source/kwsys/SystemTools.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx
index 61cca36..5ffd032 100644
--- a/Source/kwsys/SystemTools.cxx
+++ b/Source/kwsys/SystemTools.cxx
@@ -2829,6 +2829,19 @@ void SystemTools::SplitPath(const char* p,
components.push_back(root);
c += 2;
}
+ else if(c[0] == '~')
+ {
+ const char* homepath = getenv("HOME");
+ if(homepath)
+ {
+ kwsys_stl::vector<kwsys_stl::string> home_components;
+ SystemTools::SplitPath(homepath, home_components);
+ components.insert(components.end(),
+ home_components.begin(),
+ home_components.end());
+ }
+ c += 1;
+ }
else
{
// Relative path.