Yeah so I'm trying to extract that .cbz file that you see in the second picture. It's alone nested inside the folder "3". However, when the thread runs, its extractions becomes several nested directories with the zipfile's members at the end. It works how it should in that part, but the nested directories shouldn't happen
def build_issues(file_path):
file_path = os.path.abspath(file_path)
base_path = pathlib.Path(file_path).parent
print("[build_issues] file_path (abs):", file_path)
print("[build_issues] extract to:", base_path)
with ZipFile(file_path,"r") as zObject:
zObject.extractall(base_path)
print("Done")
return
An example of the filepath:
C:\Users\Nickz\OneDrive\Desktop\Code\website2\flaskr\static\Comics/justice-league-vs-suicide-squad-2016/Issues/4/issue-4.cbz
The difference of / and \ should be fixed when running abspath so that isn't an issue