mirror of
https://github.com/splitbrain/php-archive.git
synced 2025-03-15 11:39:42 +01:00
correctly remove temporary files when uncompressing ZIPs
This commit is contained in:
parent
89b4cba038
commit
a8881f4e07
@ -223,6 +223,7 @@ class Zip extends Archive
|
||||
}
|
||||
fclose($fp);
|
||||
gzclose($gzp);
|
||||
unlink($extractto); // remove temporary gz file
|
||||
}
|
||||
|
||||
touch($output, $fileinfo->getMtime());
|
||||
|
@ -140,6 +140,10 @@ class Zip_TestCase extends PHPUnit_Framework_TestCase
|
||||
$this->assertFileExists($out.'/zip/foobar/testdata2.txt', "Extracted $file");
|
||||
$this->assertEquals(13, filesize($out.'/zip/foobar/testdata2.txt'), "Extracted $file");
|
||||
|
||||
$this->assertFileExists($out.'/zip/compressable.txt', "Extracted $file");
|
||||
$this->assertEquals(1836, filesize($out.'/zip/compressable.txt'), "Extracted $file");
|
||||
$this->assertFileNotExists($out.'/zip/compressable.txt.gz', "Extracted $file");
|
||||
|
||||
self::rdelete($out);
|
||||
}
|
||||
|
||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user