summaryrefslogtreecommitdiff
path: root/configs/common
diff options
context:
space:
mode:
authorSteve Reinhardt <steve.reinhardt@amd.com>2015-03-23 16:14:19 -0700
committerSteve Reinhardt <steve.reinhardt@amd.com>2015-03-23 16:14:19 -0700
commitc55749d9989cf472cebc0bc93ccfa5edff0f67a8 (patch)
treec0d392e23164b9ea53bce035e438fbc71d843a3a /configs/common
parent5302305255732ddde8c88174a91d0e4ab56e7750 (diff)
downloadgem5-c55749d9989cf472cebc0bc93ccfa5edff0f67a8.tar.xz
config: expand '~' and '~user' in paths
Diffstat (limited to 'configs/common')
-rw-r--r--configs/common/SysPaths.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/configs/common/SysPaths.py b/configs/common/SysPaths.py
index 08d40bba4..316fd0399 100644
--- a/configs/common/SysPaths.py
+++ b/configs/common/SysPaths.py
@@ -27,7 +27,7 @@
# Authors: Ali Saidi
import os, sys
-from os.path import isdir, join as joinpath
+from os.path import join as joinpath
from os import environ as env
config_path = os.path.dirname(os.path.abspath(__file__))
@@ -59,6 +59,9 @@ def system():
except KeyError:
path = [ '/dist/m5/system', '/n/poolfs/z/dist/m5/system' ]
+ # expand '~' and '~user' in paths
+ path = map(os.path.expanduser, path)
+
# filter out non-existent directories
system.path = filter(os.path.isdir, path)