diff --git a/fs_uae_wrapper/base.py b/fs_uae_wrapper/base.py index 9c37058..74d7b0d 100644 --- a/fs_uae_wrapper/base.py +++ b/fs_uae_wrapper/base.py @@ -208,6 +208,9 @@ class Base(object): if val.startswith('/'): continue + if val.startswith('$HOME'): + continue + if val.startswith('$CONFIG'): abspath = os.path.abspath(val.replace('$CONFIG', conf_abs_dir)) changed_options[key] = abspath diff --git a/tests/test_base.py b/tests/test_base.py index 58f8875..18ffc9a 100644 --- a/tests/test_base.py +++ b/tests/test_base.py @@ -75,6 +75,11 @@ class TestBase(TestCase): bobj._normalize_options() self.assertDictEqual(bobj.fsuae_options, {'cdroms_dir': result}) + get_config.return_value = {'cdroms_dir': '$HOME/path'} + bobj.fsuae_options = utils.CmdOption() + bobj._normalize_options() + self.assertDictEqual(bobj.fsuae_options, {}) + def test_set_assets_paths(self): bobj = base.Base('Config.fs-uae', utils.CmdOption(), {})