Skip to content

Commit bb8f548

Browse files
committed
TAR: allow duplicate filenames
It's possible (if inadvisable) to have multiple entries with the same filename, getID3 will now show these. Breaking change: `[tar][file_details]` is now numeric-keyed rather than filename-keyed (the filename is still present under `[tar][file_details][#][name]`)
1 parent 290b5d6 commit bb8f548

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

getid3/getid3.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ class getID3
387387
*/
388388
protected $startup_warning = '';
389389

390-
const VERSION = '1.9.23-202501071203';
390+
const VERSION = '1.9.23-202502021530';
391391
const FREAD_BUFFER_SIZE = 32768;
392392

393393
const ATTACHMENTS_NONE = false;

getid3/module.archive.tar.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public function Analyze() {
9999
if ($name == '') {
100100
break;
101101
}
102-
$info['tar']['file_details'][$name] = array (
102+
$info['tar']['file_details'][] = array (
103103
'name' => $name,
104104
'mode_raw' => $mode,
105105
'mode' => self::display_perms($mode),
@@ -117,7 +117,7 @@ public function Analyze() {
117117
'devmajor' => $devmaj,
118118
'devminor' => $devmin
119119
);
120-
$info['tar']['files'] = getid3_lib::array_merge_clobber($info['tar']['files'], getid3_lib::CreateDeepArray($info['tar']['file_details'][$name]['name'], '/', $size));
120+
$info['tar']['files'] = getid3_lib::array_merge_clobber($info['tar']['files'], getid3_lib::CreateDeepArray($name, '/', $size));
121121
}
122122
return true;
123123
}

0 commit comments

Comments
 (0)