diff --git a/win/tools/autopatch/autopatch.py b/win/tools/autopatch/autopatch.py index 6542b0a..7f02b3d 100755 --- a/win/tools/autopatch/autopatch.py +++ b/win/tools/autopatch/autopatch.py @@ -33,8 +33,8 @@ def parse_args(): parser.add_argument("-T", "--target", nargs="+", default=[ - "Display.Driver/nvencodeapi64.dl_", - "Display.Driver/nvencodeapi.dl_", + "Display.Driver/nvencodeapi64.dll", + "Display.Driver/nvencodeapi.dll", ], help="target location(s) in archive") parser.add_argument("-N", "--target-name", @@ -156,7 +156,8 @@ def make_patch(archive, *, tmpdir, arch_tgt, sevenzip=sevenzip) as tgt: - f = expand(tgt, sevenzip=sevenzip) + with open(tgt, 'rb') as fo: + f = fo.read() offset = f.find(search) if offset == -1: raise PatternNotFoundException("Pattern not found.")