diff --git a/sphinxcontrib/confluencebuilder/assets.py b/sphinxcontrib/confluencebuilder/assets.py index e6b171b0..55b598d6 100644 --- a/sphinxcontrib/confluencebuilder/assets.py +++ b/sphinxcontrib/confluencebuilder/assets.py @@ -282,8 +282,7 @@ def _handle_entry(self, path, docname, standalone=False): if path not in self.path2asset: hash_ = ConfluenceUtil.hash_asset(path) - # str-cast for sphinx-6.1 - type_ = guess_mimetype(str(path), default=DEFAULT_CONTENT_TYPE) + type_ = guess_mimetype(path, default=DEFAULT_CONTENT_TYPE) else: hash_ = self.path2asset[path].hash type_ = self.path2asset[path].type diff --git a/sphinxcontrib/confluencebuilder/svg.py b/sphinxcontrib/confluencebuilder/svg.py index 4111c700..d49df1f4 100644 --- a/sphinxcontrib/confluencebuilder/svg.py +++ b/sphinxcontrib/confluencebuilder/svg.py @@ -65,7 +65,7 @@ def confluence_supported_svg(builder, node): return # ignore non-svgs - mimetype = guess_mimetype(str(abs_path)) # cast for sphinx-6.1 + mimetype = guess_mimetype(abs_path) if mimetype != 'image/svg+xml': return