File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -1581,11 +1581,12 @@ static ZIPARCHIVE_METHOD(addEmptyDir)
1581
1581
if (idx >= 0 ) {
1582
1582
RETVAL_FALSE ;
1583
1583
} else {
1584
- if (zip_add_dir (intern , (const char * )s ) == -1 ) {
1584
+ if (zip_dir_add (intern , (const char * )s , 0 ) == -1 ) {
1585
1585
RETVAL_FALSE ;
1586
+ } else {
1587
+ zip_error_clear (intern );
1588
+ RETVAL_TRUE ;
1586
1589
}
1587
- zip_error_clear (intern );
1588
- RETVAL_TRUE ;
1589
1590
}
1590
1591
1591
1592
if (s != dirname ) {
@@ -3020,6 +3021,9 @@ static PHP_MINIT_FUNCTION(zip)
3020
3021
REGISTER_ZIP_CLASS_CONST_LONG ("EXCL" , ZIP_EXCL );
3021
3022
REGISTER_ZIP_CLASS_CONST_LONG ("CHECKCONS" , ZIP_CHECKCONS );
3022
3023
REGISTER_ZIP_CLASS_CONST_LONG ("OVERWRITE" , ZIP_OVERWRITE );
3024
+ #ifdef ZIP_RDONLY
3025
+ REGISTER_ZIP_CLASS_CONST_LONG ("RDONLY" , ZIP_RDONLY );
3026
+ #endif
3023
3027
3024
3028
REGISTER_ZIP_CLASS_CONST_LONG ("FL_NOCASE" , ZIP_FL_NOCASE );
3025
3029
REGISTER_ZIP_CLASS_CONST_LONG ("FL_NODIR" , ZIP_FL_NODIR );
You can’t perform that action at this time.
0 commit comments