Skip to content

Commit 960813a

Browse files
committed
Fix for Manifest.plist parsing on Windows.
Due to a bug in the `Mac::PropertyList` Perl module, binary plist files (Manifest.plist, Status.plist) are sometimes randomly appear to be corrupted when running on Windows. When this happens, the script usually ends with the infamous `Not a HASH reference at ios_backup_extractor.pl line 729` error. Before this bug is fixed in an upstream module [1], this change explicitly forces Manifest.plist and Status.plist to be read in a binary mode, thus avoiding the problematic code path. [1]: briandfoy/mac-propertylist#26
1 parent 675f835 commit 960813a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ios_backup_extractor.pl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
use constant {
3131
APP_NAME => 'ios_backup_extractor',
32-
APP_VERSION => '1.2.2 (2024-03-30)',
32+
APP_VERSION => '1.2.2 (2024-07-14)',
3333
};
3434

3535
my $wanted_extensions = 'jpg|jpeg|heic|png|mov';
@@ -717,7 +717,7 @@ ($device_backup_dir)
717717
return (1, %{$g_manifest_plist_map{$device_backup_dir}})
718718
if (defined $g_manifest_plist_map{$device_backup_dir});
719719
720-
my $plist = parsePList ("$device_backup_dir/Manifest.plist");
720+
my $plist = parseBinaryPList ("$device_backup_dir/Manifest.plist");
721721
722722
return (0) unless $plist;
723723
@@ -797,7 +797,7 @@ ($device_backup_dir)
797797
return (1, %{$g_status_plist_map{$device_backup_dir}})
798798
if (defined $g_status_plist_map{$device_backup_dir});
799799
800-
my $plist = parsePList ("$device_backup_dir/Status.plist");
800+
my $plist = parseBinaryPList ("$device_backup_dir/Status.plist");
801801
802802
return (0) unless $plist;
803803

0 commit comments

Comments
 (0)