Skip to content

Commit

Permalink
Fixed broken handling of dirpath
Browse files Browse the repository at this point in the history
  • Loading branch information
rrgeorge committed Nov 16, 2021
1 parent 4bbc421 commit 6af3720
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions foundrytoencounter.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from google.protobuf import text_format
import fonts_public_pb2

VERSION = "1.13.4"
VERSION = "1.13.5"

zipfile.ZIP64_LIMIT = 4294967294
PIL.Image.MAX_IMAGE_PIXELS = 200000000
Expand Down Expand Up @@ -1628,7 +1628,7 @@ def progress(block_num, block_size, total_size):
)
if any(x.startswith("{}/".format(mod["name"])) for x in z.namelist()):
pack["path"] = mod["name"] + "/" + pack["path"]
if dirpath and any(x.startswith("{}/".format(dirpath)) for x in z.namelist()):
if dirpath and not pack["path"].startswith("{}/".format(dirpath)) and any(x.startswith("{}/".format(dirpath)) for x in z.namelist()):
pack["path"] = dirpath + "/" + pack["path"]
if pack["path"].startswith("./") and dirpath:
pack["path"] = dirpath + pack["path"][1:]
Expand Down

0 comments on commit 6af3720

Please sign in to comment.