From a56c185935dce786aeffcaaea9e86998d3555e6c Mon Sep 17 00:00:00 2001 From: glacambre Date: Wed, 12 Dec 2018 07:12:49 +0100 Subject: [PATCH] native_main.py: Add ".txt" suffix to temporary file names Reasons explained in https://github.com/tridactyl/tridactyl/issues/1204 Closes #1204 --- native/native_main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/native/native_main.py b/native/native_main.py index 5a9b17e1..580715f7 100755 --- a/native/native_main.py +++ b/native/native_main.py @@ -477,7 +477,7 @@ def handleMessage(message): prefix = "" prefix = "tmp_{}_".format(sanitizeFilename(prefix)) - (handle, filepath) = tempfile.mkstemp(prefix=prefix) + (handle, filepath) = tempfile.mkstemp(prefix=prefix, suffix=".txt") with os.fdopen(handle, "w") as file: file.write(message["content"]) reply["content"] = filepath