mercurial/hgweb/common.py
changeset 45379 ec2fc4d038c2
parent 45378 dc9fe90bdbd5
child 45380 f0735f2ce542
--- a/mercurial/hgweb/common.py	Sat Aug 22 16:03:44 2020 -0700
+++ b/mercurial/hgweb/common.py	Mon Aug 03 23:38:50 2020 -0700
@@ -201,7 +201,7 @@
     try:
         os.stat(path)
         ct = pycompat.sysbytes(
-            mimetypes.guess_type(pycompat.fsdecode(path))[0] or r"text/plain"
+            mimetypes.guess_type(pycompat.fsdecode(fpath))[0] or r"text/plain"
         )
         with open(path, b'rb') as fh:
             data = fh.read()