diff --git a/proton b/proton index c3b2c648..361c6908 100755 --- a/proton +++ b/proton @@ -269,29 +269,34 @@ ARCH_I386=1 ARCH_X86_64=2 def determine_architecture(path): #algorithm from file's msdos magic file - with open(path, "rb") as f: - magic = f.read(2) - if magic != "MZ": + try: + with open(path, "rb") as f: + magic = f.read(2) + if magic != "MZ": + return ARCH_UNKNOWN + f.seek(0x18) + reloc = struct.unpack(' windows path path = subprocess.check_output([wine_path, "winepath", "-w", sys.argv[2]], env=env, stderr=lfile)