Ensure different tmp-file names if os.getpid() is not available

master
Mark Qvist 2026-05-20 19:52:55 +02:00
parent 7f0e2627d1
commit d6ec05193b
1 changed files with 1 additions and 1 deletions

View File

@ -672,7 +672,7 @@ class LXMessage:
def write_to_directory(self, directory_path):
file_name = RNS.hexrep(self.hash, delimit=False)
file_path = directory_path+"/"+file_name
tmp_path = file_path+".tmp."+str(os.getpid())
tmp_path = file_path+".tmp."+str(os.getpid() or time.time())
try:
with open(tmp_path, "wb") as file: