Commit 9e20a706 authored by Jai Luthra's avatar Jai Luthra Committed by GitHub

win: autopatch: Support both dll/dl_ as targets

parent b368b4ea
...@@ -156,8 +156,11 @@ def make_patch(archive, *, ...@@ -156,8 +156,11 @@ def make_patch(archive, *,
tmpdir, tmpdir,
arch_tgt, arch_tgt,
sevenzip=sevenzip) as tgt: sevenzip=sevenzip) as tgt:
if tgt.endswith(".dll"):
with open(tgt, 'rb') as fo: with open(tgt, 'rb') as fo:
f = fo.read() 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.")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment