mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 09:02:15 -06:00
support ?doc=mojibake
This commit is contained in:
parent
c0de3c8053
commit
23e4b9002f
|
@ -2443,7 +2443,7 @@ class HttpCli(object):
|
|||
docpath = os.path.join(abspath, doc)
|
||||
sz = bos.path.getsize(docpath)
|
||||
if sz < 1024 * self.args.txt_max:
|
||||
with open(docpath, "rb") as f:
|
||||
with open(fsenc(docpath), "rb") as f:
|
||||
doctxt = f.read().decode("utf-8", "replace")
|
||||
else:
|
||||
self.log("doc 404: [{}]".format(doc), c=6)
|
||||
|
|
Loading…
Reference in a new issue