Update tuilib.py

Discovered that `keystrokes.log` creating in folder from which game calling, not especially daemon folder.
So before changed from correct to not correct :/
This commit is contained in:
Anton "TonyL" Lysakov
2019-03-31 05:42:13 +07:00
committed by GitHub
parent d605780e57
commit d3ff021e33

View File

@@ -1952,10 +1952,10 @@ def find_game_keystrokes_in_log(gametxid):
operating_system = platform.system()
if operating_system == 'Win64' or operating_system == 'Windows':
p1 = subprocess.Popen(["type", "../keystrokes.log"], stdout=subprocess.PIPE, shell=True)
p1 = subprocess.Popen(["type", "keystrokes.log"], stdout=subprocess.PIPE, shell=True)
p2 = subprocess.Popen(["findstr", gametxid], stdin=p1.stdout, stdout=subprocess.PIPE, shell=True)
else:
p1 = subprocess.Popen(["cat", "../keystrokes.log"], stdout=subprocess.PIPE)
p1 = subprocess.Popen(["cat", "keystrokes.log"], stdout=subprocess.PIPE)
p2 = subprocess.Popen(["grep", gametxid], stdin=p1.stdout, stdout=subprocess.PIPE)
p1.stdout.close()
output = p2.communicate()[0]