File tree Expand file tree Collapse file tree 1 file changed +15
-5
lines changed
Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -497,12 +497,10 @@ sub extractMediaFiles
497497 say STDERR " ╭────┤Extracting from: [${media_location}$media_subdir]" ;
498498 }
499499
500- # add '_DELETED' flag to files marked as deleted
501- my $deleted_flag = ($cmd_options {' add-trash' } && $g_deleted_files {$relative_path })
502- ? ' _DELETED'
503- : q{};
500+ my $is_icloud_media = index ($media_location , ' CPLAssets' ) != - 1 ;
504501
505- my $filename = $+ {filename} . $deleted_flag . q{.} . lc $+ {extension};
502+ # save the filename and extension from the regex match
503+ my ($re_filename , $re_extension ) = ($+ {filename}, $+ {extension});
506504
507505 # find the file in the blob storage
508506 my $subdir = $file_id = ~ s/ ^(\w\w ).+ $/ $1 / r
@@ -513,6 +511,18 @@ sub extractMediaFiles
513511 # parse the bplist from the SQLite database for this entry
514512 my $bplist_obj = parseBPlist ($row->{file}, $file_id);
515513
514+ # DEBUG
515+ #my $obj_dump = Data::Dumper::Dumper ($bplist_obj);
516+ #$obj_dump =~ s/[^\x 20-\x 7E\x 0A]/{β}/g; # Replaces non-printable characters
517+ #say ($obj_dump);
518+
519+ # add ' _DELETED' flag to files marked as deleted
520+ my $deleted_flag = ($cmd_options{' add- trash' } && $g_deleted_files{$relative_path})
521+ ? ' _DELETED'
522+ : q{};
523+
524+ my $filename = $re_filename . $deleted_flag . q{.} . lc $re_extension;
525+
516526 # find the "LastModified" date for this file
517527 my $lastmodif_time_piece
518528 = defined $bplist_obj
You can’t perform that action at this time.
0 commit comments