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 @@ -1626,11 +1626,12 @@ static ZIPARCHIVE_METHOD(addEmptyDir)
1626
1626
if (idx >= 0 ) {
1627
1627
RETVAL_FALSE ;
1628
1628
} else {
1629
- if (zip_add_dir (intern , (const char * )s ) == -1 ) {
1629
+ if (zip_dir_add (intern , (const char * )s , 0 ) == -1 ) {
1630
1630
RETVAL_FALSE ;
1631
+ } else {
1632
+ zip_error_clear (intern );
1633
+ RETVAL_TRUE ;
1631
1634
}
1632
- zip_error_clear (intern );
1633
- RETVAL_TRUE ;
1634
1635
}
1635
1636
1636
1637
if (s != dirname ) {
@@ -3044,6 +3045,9 @@ static PHP_MINIT_FUNCTION(zip)
3044
3045
REGISTER_ZIP_CLASS_CONST_LONG ("EXCL" , ZIP_EXCL );
3045
3046
REGISTER_ZIP_CLASS_CONST_LONG ("CHECKCONS" , ZIP_CHECKCONS );
3046
3047
REGISTER_ZIP_CLASS_CONST_LONG ("OVERWRITE" , ZIP_OVERWRITE );
3048
+ #ifdef ZIP_RDONLY
3049
+ REGISTER_ZIP_CLASS_CONST_LONG ("RDONLY" , ZIP_RDONLY );
3050
+ #endif
3047
3051
3048
3052
REGISTER_ZIP_CLASS_CONST_LONG ("FL_NOCASE" , ZIP_FL_NOCASE );
3049
3053
REGISTER_ZIP_CLASS_CONST_LONG ("FL_NODIR" , ZIP_FL_NODIR );
You can’t perform that action at this time.
0 commit comments