Don't silently traceback when trying to message someone privately in a MUC
Using jidstr with slashes "escaped" as backslashes is clever, but _check_and_create_log_dir still expects a parsable JID to check config.
This commit is contained in:
parent
0676cec53e
commit
5d14094780
1 changed files with 3 additions and 1 deletions
|
@ -196,6 +196,8 @@ class Logger:
|
|||
"""
|
||||
if not config.get_by_tabname('use_log', JID(jid)):
|
||||
return None
|
||||
# POSIX filesystems don't support / in filename, so we replace it with a backslash
|
||||
jid = str(jid).replace('/', '\\')
|
||||
try:
|
||||
self.log_dir.mkdir(parents=True, exist_ok=True)
|
||||
except OSError:
|
||||
|
@ -255,7 +257,7 @@ class Logger:
|
|||
if jidstr in self._fds.keys():
|
||||
fd = self._fds[jidstr]
|
||||
else:
|
||||
option_fd = self._check_and_create_log_dir(jidstr)
|
||||
option_fd = self._check_and_create_log_dir(jid)
|
||||
if option_fd is None:
|
||||
return True
|
||||
fd = option_fd
|
||||
|
|
Loading…
Reference in a new issue