|
@@ 3739-3747 (lines=9) @@
|
| 3736 |
|
// ----- Look for PCLZIP_OPT_STOP_ON_ERROR |
| 3737 |
|
// For historical reason first PclZip implementation does not stop |
| 3738 |
|
// when this kind of error occurs. |
| 3739 |
|
if ( (isset($p_options[PCLZIP_OPT_STOP_ON_ERROR])) |
| 3740 |
|
&& ($p_options[PCLZIP_OPT_STOP_ON_ERROR]===true)) { |
| 3741 |
|
|
| 3742 |
|
PclZip::privErrorLog(PCLZIP_ERR_ALREADY_A_DIRECTORY, |
| 3743 |
|
"Filename '".$p_entry['filename']."' is " |
| 3744 |
|
."already used by an existing directory"); |
| 3745 |
|
|
| 3746 |
|
return PclZip::errorCode(); |
| 3747 |
|
} |
| 3748 |
|
} |
| 3749 |
|
// ----- Look if file is write protected |
| 3750 |
|
else if (!is_writeable($p_entry['filename'])) |
|
@@ 3759-3767 (lines=9) @@
|
| 3756 |
|
// ----- Look for PCLZIP_OPT_STOP_ON_ERROR |
| 3757 |
|
// For historical reason first PclZip implementation does not stop |
| 3758 |
|
// when this kind of error occurs. |
| 3759 |
|
if ( (isset($p_options[PCLZIP_OPT_STOP_ON_ERROR])) |
| 3760 |
|
&& ($p_options[PCLZIP_OPT_STOP_ON_ERROR]===true)) { |
| 3761 |
|
|
| 3762 |
|
PclZip::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL, |
| 3763 |
|
"Filename '".$p_entry['filename']."' exists " |
| 3764 |
|
."and is write protected"); |
| 3765 |
|
|
| 3766 |
|
return PclZip::errorCode(); |
| 3767 |
|
} |
| 3768 |
|
} |
| 3769 |
|
|
| 3770 |
|
// ----- Look if the extracted file is older |
|
@@ 3777-3792 (lines=16) @@
|
| 3774 |
|
if ( (isset($p_options[PCLZIP_OPT_REPLACE_NEWER])) |
| 3775 |
|
&& ($p_options[PCLZIP_OPT_REPLACE_NEWER]===true)) { |
| 3776 |
|
} |
| 3777 |
|
else { |
| 3778 |
|
$p_entry['status'] = "newer_exist"; |
| 3779 |
|
|
| 3780 |
|
// ----- Look for PCLZIP_OPT_STOP_ON_ERROR |
| 3781 |
|
// For historical reason first PclZip implementation does not stop |
| 3782 |
|
// when this kind of error occurs. |
| 3783 |
|
if ( (isset($p_options[PCLZIP_OPT_STOP_ON_ERROR])) |
| 3784 |
|
&& ($p_options[PCLZIP_OPT_STOP_ON_ERROR]===true)) { |
| 3785 |
|
|
| 3786 |
|
PclZip::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL, |
| 3787 |
|
"Newer version of '".$p_entry['filename']."' exists " |
| 3788 |
|
."and option PCLZIP_OPT_REPLACE_NEWER is not selected"); |
| 3789 |
|
|
| 3790 |
|
return PclZip::errorCode(); |
| 3791 |
|
} |
| 3792 |
|
} |
| 3793 |
|
} |
| 3794 |
|
else { |
| 3795 |
|
} |