File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -4,15 +4,16 @@ Bug #40228 (extractTo does not create recursive empty path)
4
4
<?php if (!extension_loaded ("zip " )) print "skip " ; ?>
5
5
--FILE--
6
6
<?php
7
- $ dest = __DIR__ ;
8
- $ arc_name = $ dest . "/bug40228私はガラスを食べられます.zip " ;
7
+ $ dest = __DIR__ . " /bug40228-mb " ;
8
+ $ arc_name = __DIR__ . "/bug40228私はガラスを食べられます.zip " ;
9
9
$ zip = new ZipArchive ;
10
10
$ zip ->open ($ arc_name , ZIPARCHIVE ::CREATE );
11
11
$ zip ->extractTo ($ dest );
12
12
if (is_dir ($ dest . '/test/empty ' )) {
13
13
echo "Ok \n" ;
14
14
rmdir ($ dest . '/test/empty ' );
15
15
rmdir ($ dest . '/test ' );
16
+ rmdir ($ dest );
16
17
} else {
17
18
echo "Failed. \n" ;
18
19
}
Original file line number Diff line number Diff line change @@ -4,15 +4,16 @@ Bug #40228 (extractTo does not create recursive empty path)
4
4
<?php if (!extension_loaded ("zip " )) print "skip " ; ?>
5
5
--FILE--
6
6
<?php
7
- $ dest = __DIR__ ;
8
- $ arc_name = $ dest . "/bug40228.zip " ;
7
+ $ dest = __DIR__ . " /bug40228 " ;
8
+ $ arc_name = __DIR__ . "/bug40228.zip " ;
9
9
$ zip = new ZipArchive ;
10
10
$ zip ->open ($ arc_name , ZIPARCHIVE ::CREATE );
11
11
$ zip ->extractTo ($ dest );
12
12
if (is_dir ($ dest . '/test/empty ' )) {
13
13
echo "Ok \n" ;
14
14
rmdir ($ dest . '/test/empty ' );
15
15
rmdir ($ dest . '/test ' );
16
+ rmdir ($ dest );
16
17
} else {
17
18
echo "Failed. \n" ;
18
19
}
You can’t perform that action at this time.
0 commit comments