Skip to content

Commit

Permalink
fix: fixed bug, where directories could not be pushed if commit files…
Browse files Browse the repository at this point in the history
… were selected
  • Loading branch information
florian-jaeger committed Sep 25, 2024
1 parent 53257a0 commit b18a213
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion grader_labextension/services/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ def copy_repo_contents(self, src: str, selected_files: List[str] = None):
Args:
src (str): path where the to be copied files reside
"""
ignore = shutil.ignore_patterns(".git", "__pycache__")
if(selected_files):
self.log.info(f"Copying only selected files from {src} to {self.path}")
for item in os.listdir(src):
Expand All @@ -266,7 +267,6 @@ def copy_repo_contents(self, src: str, selected_files: List[str] = None):
shutil.copy2(s, d)
else:
self.log.info(f"Copying repository contents from {src} to {self.path}")
ignore = shutil.ignore_patterns(".git", "__pycache__")
if sys.version_info.major == 3 and sys.version_info.minor >= 8:
shutil.copytree(src, self.path, ignore=ignore, dirs_exist_ok=True)
else:
Expand Down

0 comments on commit b18a213

Please sign in to comment.