Skip to content

Commit

Permalink
Use realpath when getting the repo to handle symlinks
Browse files Browse the repository at this point in the history
  • Loading branch information
tmetzl committed Jan 20, 2025
1 parent a5d43ea commit dc9a3ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions e2xauthoring/models/pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def __init__(self, name: str, base_path: str):
self.name = name
self.base_path = base_path
self.path = os.path.join(base_path, name)
self.repo = GitRepoFactory.get_instance(self.path)
self.repo = GitRepoFactory.get_instance(os.path.realpath(self.path))
self.repo.attach(self)
self._is_version_controlled = self.repo.is_version_controlled
self.tasks = self.init_tasks()
Expand Down Expand Up @@ -68,7 +68,7 @@ def rename(self, new_name: str):
self.repo.update_status()

def turn_into_repository(self):
self.repo = GitRepoFactory.get_instance(self.path)
self.repo = GitRepoFactory.get_instance(os.path.realpath(self.path))
self.repo.attach(self)
self.repo.initialize_repo(exist_ok=True, author=Actor(**get_author()))

Expand Down

0 comments on commit dc9a3ff

Please sign in to comment.