summaryrefslogtreecommitdiff
path: root/sphinx/util/osutil.py
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/util/osutil.py')
-rw-r--r--sphinx/util/osutil.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/util/osutil.py b/sphinx/util/osutil.py
index 23f5b0137..0390b038d 100644
--- a/sphinx/util/osutil.py
+++ b/sphinx/util/osutil.py
@@ -168,10 +168,10 @@ def abspath(pathdir: str) -> str:
if isinstance(pathdir, bytes):
try:
pathdir = pathdir.decode(fs_encoding)
- except UnicodeDecodeError:
+ except UnicodeDecodeError as exc:
raise UnicodeDecodeError('multibyte filename not supported on '
'this filesystem encoding '
- '(%r)' % fs_encoding)
+ '(%r)' % fs_encoding) from exc
return pathdir