mirror of
https://github.com/9001/copyparty.git
synced 2026-04-12 23:32:32 -06:00
Oopsie dupsie :>
idon'tknowhyididthis;-;
This commit is contained in:
parent
1c474fef16
commit
30fc17a540
|
|
@ -1373,7 +1373,7 @@ class SvcHub(object):
|
||||||
lh = codecs.open(fn, "w", encoding="utf-8", errors="replace")
|
lh = codecs.open(fn, "w", encoding="utf-8", errors="replace")
|
||||||
|
|
||||||
# Patch the opened log file write method
|
# Patch the opened log file write method
|
||||||
orig_w = getattr(lh, "write")
|
orig_w = lh.write
|
||||||
|
|
||||||
def patched_write(data: str):
|
def patched_write(data: str):
|
||||||
try:
|
try:
|
||||||
|
|
@ -1382,8 +1382,7 @@ class SvcHub(object):
|
||||||
clean = data
|
clean = data
|
||||||
return orig_w(clean)
|
return orig_w(clean)
|
||||||
|
|
||||||
setattr(lh, "write", patched_write)
|
lh.write = patched_write #type: ignore
|
||||||
# lh.write = patched_write #type: ignore
|
|
||||||
|
|
||||||
if getattr(self.args, "free_umask", False):
|
if getattr(self.args, "free_umask", False):
|
||||||
os.fchmod(lh.fileno(), 0o644)
|
os.fchmod(lh.fileno(), 0o644)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue