mirror of
https://github.com/markqvist/LXMF.git
synced 2026-04-27 14:20:39 +00:00
Merge pull request #34 from busimus/master
Fix stored messages always getting deleted if config path has underscores
This commit is contained in:
commit
557887d13f
1 changed files with 3 additions and 2 deletions
|
|
@ -1090,9 +1090,10 @@ class LXMRouter:
|
|||
for transient_id in self.propagation_entries.copy():
|
||||
entry = self.propagation_entries[transient_id]
|
||||
filepath = entry[1]
|
||||
components = filepath.split("_")
|
||||
filename = os.path.split(filepath)[-1]
|
||||
components = filename.split("_")
|
||||
|
||||
if len(components) == 2 and float(components[1]) > 0 and len(os.path.split(components[0])[1]) == (RNS.Identity.HASHLENGTH//8)*2:
|
||||
if len(components) == 2 and float(components[1]) > 0 and len(components[0]) == (RNS.Identity.HASHLENGTH//8)*2:
|
||||
timestamp = float(components[1])
|
||||
if now > timestamp+LXMRouter.MESSAGE_EXPIRY:
|
||||
RNS.log("Purging message "+RNS.prettyhexrep(transient_id)+" due to expiry", RNS.LOG_EXTREME)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue