Skip to content

Commit

Permalink
Don't dereference symlinks when copying files
Browse files Browse the repository at this point in the history
This prevents FileNotFoundError exceptions on broken symlinks.
Symlinks in a repository should be relative anyway, so there is no
advantage to dereferencing them.
  • Loading branch information
brechtm committed Aug 19, 2016
1 parent 5209695 commit 91083f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sphinxcontrib/versioning/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ def export(local_root, commit, target):
if not os.path.exists(t_dirpath):
os.makedirs(t_dirpath)
for args in ((os.path.join(s_dirpath, f), os.path.join(t_dirpath, f)) for f in s_filenames):
shutil.copy(*args)
shutil.copy(*args, follow_symlinks=False)


def clone(local_root, new_root, branch, rel_dest, exclude):
Expand Down

0 comments on commit 91083f8

Please sign in to comment.