diff --git a/material/plugins/privacy/plugin.py b/material/plugins/privacy/plugin.py index 106b9d203..fbf2d424a 100644 --- a/material/plugins/privacy/plugin.py +++ b/material/plugins/privacy/plugin.py @@ -200,9 +200,11 @@ class PrivacyPlugin(BasePlugin[PrivacyConfig]): self._patch, file )) - # Otherwise just copy external asset to output directory + # Otherwise just copy external asset to output directory if it + # exists, i.e., if the download succeeded else: - file.copy_file() + if os.path.exists(file.abs_src_path): + file.copy_file() # Reconcile concurrent jobs for the last time, so the plugins following # in the build process always have a consistent state to work with diff --git a/src/plugins/privacy/plugin.py b/src/plugins/privacy/plugin.py index 106b9d203..fbf2d424a 100644 --- a/src/plugins/privacy/plugin.py +++ b/src/plugins/privacy/plugin.py @@ -200,9 +200,11 @@ class PrivacyPlugin(BasePlugin[PrivacyConfig]): self._patch, file )) - # Otherwise just copy external asset to output directory + # Otherwise just copy external asset to output directory if it + # exists, i.e., if the download succeeded else: - file.copy_file() + if os.path.exists(file.abs_src_path): + file.copy_file() # Reconcile concurrent jobs for the last time, so the plugins following # in the build process always have a consistent state to work with