| @@ 2119-2140 (lines=22) @@ | ||
| 2116 | $v_extract_file = 0; |
|
| 2117 | }*/ |
|
| 2118 | } // ----- Check the directory availability and create it if necessary |
|
| 2119 | else { |
|
| 2120 | if ($v_header['typeflag'] == '5') { |
|
| 2121 | $v_dir_to_check = $v_header['filename']; |
|
| 2122 | } else { |
|
| 2123 | if (false === strpos($v_header['filename'], '/')) { |
|
| 2124 | $v_dir_to_check = ''; |
|
| 2125 | } else { |
|
| 2126 | $v_dir_to_check = dirname($v_header['filename']); |
|
| 2127 | } |
|
| 2128 | } |
|
| 2129 | ||
| 2130 | if (($v_result = PclTarHandlerDirCheck($v_dir_to_check)) != 1) { |
|
| 2131 | TrFctMessage(__FILE__, __LINE__, 2, 'Unable to create path for ' . $v_header['filename'] . ''); |
|
| 2132 | ||
| 2133 | // ----- Change the file status |
|
| 2134 | $v_header['status'] = 'path_creation_fail'; |
|
| 2135 | ||
| 2136 | // ----- Skip the extract |
|
| 2137 | $v_extraction_stopped = 1; |
|
| 2138 | $v_extract_file = 0; |
|
| 2139 | } |
|
| 2140 | } |
|
| 2141 | ||
| 2142 | // ----- Do the extraction |
|
| 2143 | if ($v_extract_file && ($v_header['typeflag'] != '5')) { |
|
| @@ 2648-2669 (lines=22) @@ | ||
| 2645 | } |
|
| 2646 | } |
|
| 2647 | } // ----- Check the directory availability and create it if necessary |
|
| 2648 | else { |
|
| 2649 | if ($v_header['typeflag'] == '5') { |
|
| 2650 | $v_dir_to_check = $v_header['filename']; |
|
| 2651 | } else { |
|
| 2652 | if (false === strpos($v_header['filename'], '/')) { |
|
| 2653 | $v_dir_to_check = ''; |
|
| 2654 | } else { |
|
| 2655 | $v_dir_to_check = dirname($v_header['filename']); |
|
| 2656 | } |
|
| 2657 | } |
|
| 2658 | ||
| 2659 | if (($v_result = PclTarHandlerDirCheck($v_dir_to_check)) != 1) { |
|
| 2660 | TrFctMessage(__FILE__, __LINE__, 2, 'Unable to create path for ' . $v_header['filename'] . ''); |
|
| 2661 | ||
| 2662 | // ----- Change the file status |
|
| 2663 | $v_header['status'] = 'path_creation_fail'; |
|
| 2664 | ||
| 2665 | // ----- Skip the extract |
|
| 2666 | $v_extraction_stopped = 1; |
|
| 2667 | $v_extract_file = 0; |
|
| 2668 | } |
|
| 2669 | } |
|
| 2670 | ||
| 2671 | // ----- Do the real bytes extraction (if not a directory) |
|
| 2672 | if ($v_extract_file && ($v_header['typeflag'] != '5')) { |
|