From c933c6a5791b814996f64d09ba6589818ffab6e3 Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Tue, 16 Jun 2015 17:24:24 +0100 Subject: Don't ignore the 'cwd' parameter Thanks to Richard Maw for suggesting this fixup. --- morphlib/definitions_repo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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): -- cgit v1.2.1