diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2015-06-16 17:24:24 +0100 |
---|---|---|
committer | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2015-06-16 17:25:48 +0100 |
commit | c933c6a5791b814996f64d09ba6589818ffab6e3 (patch) | |
tree | f0d1f6128e050f716b8443e8f1df6928c19fbe40 | |
parent | 706bbe19ff87ac65d21634246c0bc3d5acb57562 (diff) | |
download | morph-c933c6a5791b814996f64d09ba6589818ffab6e3.tar.gz |
Don't ignore the 'cwd' parameter
Thanks to Richard Maw for suggesting this fixup.
-rw-r--r-- | morphlib/definitions_repo.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/morphlib/definitions_repo.py b/morphlib/definitions_repo.py index 40aeecff..07c2dbb6 100644 --- a/morphlib/definitions_repo.py +++ b/morphlib/definitions_repo.py @@ -252,7 +252,7 @@ class DefinitionsRepo(gitdir.GitDirectory): def path_is_outside_repo(path): return path.split(os.sep, 1)[0] == '..' - absolute_path = os.path.abspath(path) + absolute_path = os.path.join(cwd, os.path.abspath(path)) repo_relative_path = os.path.relpath(absolute_path, self.dirname) if path_is_outside_repo(repo_relative_path): |