| @@ 311-315 (lines=5) @@ | ||
| 308 | // if we get this far, must be OK |
|
| 309 | if (is_string($this->inline_attachments)) { |
|
| 310 | $destination_filename = $this->inline_attachments.DIRECTORY_SEPARATOR.md5($info['filenamepath']).'_'.$thisfile_ape_items_current['data_offset']; |
|
| 311 | if (!file_exists($destination_filename) || getID3::is_writable($destination_filename)) { |
|
| 312 | file_put_contents($destination_filename, $thisfile_ape_items_current['data']); |
|
| 313 | } else { |
|
| 314 | $this->warning('attachment at '.$thisfile_ape_items_current['offset'].' cannot be saved to "'.$destination_filename.'" (not writable)'); |
|
| 315 | } |
|
| 316 | $thisfile_ape_items_current['data_filename'] = $destination_filename; |
|
| 317 | unset($thisfile_ape_items_current['data']); |
|
| 318 | } else { |
|
| @@ 1459-1463 (lines=5) @@ | ||
| 1456 | // if we get this far, must be OK |
|
| 1457 | if (is_string($this->getid3->option_save_attachments)) { |
|
| 1458 | $destination_filename = $dir.DIRECTORY_SEPARATOR.md5($info['filenamepath']).'_'.$frame_offset; |
|
| 1459 | if (!file_exists($destination_filename) || getID3::is_writable($destination_filename)) { |
|
| 1460 | file_put_contents($destination_filename, $parsedFrame['data']); |
|
| 1461 | } else { |
|
| 1462 | $this->warning('attachment at '.$frame_offset.' cannot be saved to "'.$destination_filename.'" (not writable)'); |
|
| 1463 | } |
|
| 1464 | $parsedFrame['data_filename'] = $destination_filename; |
|
| 1465 | unset($parsedFrame['data']); |
|
| 1466 | } else { |
|