mirror of
https://github.com/keylase/nvidia-patch.git
synced 2025-04-25 15:46:20 +00:00
win: autopatch: Support both dll/dl_ as targets
This commit is contained in:
parent
b368b4ea09
commit
9e20a7068f
@ -156,8 +156,11 @@ def make_patch(archive, *,
|
|||||||
tmpdir,
|
tmpdir,
|
||||||
arch_tgt,
|
arch_tgt,
|
||||||
sevenzip=sevenzip) as tgt:
|
sevenzip=sevenzip) as tgt:
|
||||||
with open(tgt, 'rb') as fo:
|
if tgt.endswith(".dll"):
|
||||||
f = fo.read()
|
with open(tgt, 'rb') as fo:
|
||||||
|
f = fo.read()
|
||||||
|
else:
|
||||||
|
f = expand(tgt, sevenzip=sevenzip)
|
||||||
offset = f.find(search)
|
offset = f.find(search)
|
||||||
if offset == -1:
|
if offset == -1:
|
||||||
raise PatternNotFoundException("Pattern not found.")
|
raise PatternNotFoundException("Pattern not found.")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user