@@ 3457-3470 (lines=14) @@ | ||
3454 | ||
3455 | return self::errorCode(); |
|
3456 | } |
|
3457 | } elseif (!is_writeable($p_entry['filename'])) { |
|
3458 | // ----- Look if file is write protected |
|
3459 | // ----- Change the file status |
|
3460 | $p_entry['status'] = 'write_protected'; |
|
3461 | ||
3462 | // ----- Look for PCLZIP_OPT_STOP_ON_ERROR |
|
3463 | // For historical reason first PclZip implementation does not stop |
|
3464 | // when this kind of error occurs. |
|
3465 | if ((isset($p_options[PCLZIP_OPT_STOP_ON_ERROR])) && ($p_options[PCLZIP_OPT_STOP_ON_ERROR] === true)) { |
|
3466 | self::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL, "Filename '" . $p_entry['filename'] . "' exists and is write protected"); |
|
3467 | ||
3468 | return self::errorCode(); |
|
3469 | } |
|
3470 | } elseif (filemtime($p_entry['filename']) > $p_entry['mtime']) { |
|
3471 | // ----- Look if the extracted file is older |
|
3472 | // ----- Change the file status |
|
3473 | if ((isset($p_options[PCLZIP_OPT_REPLACE_NEWER])) && ($p_options[PCLZIP_OPT_REPLACE_NEWER] === true)) { |
|
@@ 3474-3485 (lines=12) @@ | ||
3471 | // ----- Look if the extracted file is older |
|
3472 | // ----- Change the file status |
|
3473 | if ((isset($p_options[PCLZIP_OPT_REPLACE_NEWER])) && ($p_options[PCLZIP_OPT_REPLACE_NEWER] === true)) { |
|
3474 | } else { |
|
3475 | $p_entry['status'] = 'newer_exist'; |
|
3476 | ||
3477 | // ----- Look for PCLZIP_OPT_STOP_ON_ERROR |
|
3478 | // For historical reason first PclZip implementation does not stop |
|
3479 | // when this kind of error occurs. |
|
3480 | if ((isset($p_options[PCLZIP_OPT_STOP_ON_ERROR])) && ($p_options[PCLZIP_OPT_STOP_ON_ERROR] === true)) { |
|
3481 | self::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL, "Newer version of '" . $p_entry['filename'] . "' exists and option PCLZIP_OPT_REPLACE_NEWER is not selected"); |
|
3482 | ||
3483 | return self::errorCode(); |
|
3484 | } |
|
3485 | } |
|
3486 | } else { |
|
3487 | } |
|
3488 | } else { |