Fix nested iOS media directory extraction

Create parent directories when an iOS backup manifest contains a nested directory path. Add a regression test covering the reported iOS 26 layout.
This commit is contained in:
Sanjay Santhanam
2026-07-19 15:48:38 -07:00
parent 3ecb74b0bd
commit 12981a148b
2 changed files with 28 additions and 4 deletions
+1 -4
View File
@@ -230,10 +230,7 @@ class BackupExtractor:
flags = row["flags"]
if flags == 2: # Directory
try:
os.mkdir(destination)
except FileExistsError:
pass
os.makedirs(destination, exist_ok=True)
elif flags == 1: # File
shutil.copyfile(os.path.join(self.base_dir, folder, hashes), destination)
metadata = BPListReader(row["metadata"]).parse()