Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix copying images under parallel execution #11100

Merged
merged 6 commits into from Jan 7, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions sphinx/builders/html/__init__.py
Expand Up @@ -764,13 +764,13 @@ def write_domain_indices(self) -> None:
self.handle_page(indexname, indexcontext, 'domainindex.html')

def copy_image_files(self) -> None:
if self.images:
if self.env.images:
stringify_func = ImageAdapter(self.app.env).get_original_image_uri
ensuredir(path.join(self.outdir, self.imagedir))
for src in status_iterator(self.images, __('copying images... '), "brown",
len(self.images), self.app.verbosity,
for src in status_iterator(self.env.images, __('copying images... '), "brown",
len(self.env.images), self.app.verbosity,
stringify_func=stringify_func):
dest = self.images[src]
_docnames, dest = self.env.images[src]
try:
copyfile(path.join(self.srcdir, src),
path.join(self.outdir, self.imagedir, dest))
Expand Down