Commit Graph

267 Commits

Author SHA1 Message Date
Steph Fox
247d91e780 - 'It builds on my box'.
- Don't expect any tests to pass.
2008-05-13 18:35:25 +00:00
Greg Beaver
82dc03941a fix weird alias issues, add tests to check for new-found problems 2008-05-12 20:42:07 +00:00
Greg Beaver
ad1be25d8c don't copy contents of linked/mounted files when converting an archive, and be sure to dupe mounted value 2008-05-11 22:45:03 +00:00
Greg Beaver
7149523766 add safety check to prevent unlinkArchive() from being called by a file within the archive 2008-05-11 21:15:47 +00:00
Greg Beaver
38d5943ee6 increase code coverage of funcinterceptors to 90%+, fix many bugs, fix errant wrong test condition in fgc_edgecases 2008-05-11 19:17:51 +00:00
Greg Beaver
53e02373d0 fix handling of mounted entries when flushing in all phars, and of deleted entries with open references in tar-based phars, do not extract mounted entries, add to test 2008-05-08 02:58:45 +00:00
Greg Beaver
f134a909c3 optimize phar filename extension detection to first search through known phars. This eliminates several stat/realpath calls for archives with lots of files 2008-05-07 17:24:22 +00:00
Greg Beaver
eda25ddb34 validate user-supplied aliases when converting archives to other formats 2008-05-07 06:36:24 +00:00
Greg Beaver
549bf83bd1 [DOC]
remove phar.extract_list
remove Phar::getExtractList()
2008-05-07 05:38:31 +00:00
Greg Beaver
196f0ef42b fix segfault in buildfromdirectory2 test and potential segfault 2008-05-06 21:23:48 +00:00
Greg Beaver
5ba8ca70a4 fix alias overloading handling for archives that are not in use 2008-05-06 21:14:53 +00:00
Steph Fox
c322c1a94a - Kill Windows warning when int meets short
- All tests still pass
2008-05-03 21:09:56 +00:00
Greg Beaver
a180fcc9bc add Phar::unlinkArchive() to allow complete removal of a parsed phar archive from memory and disk 2008-05-03 02:04:24 +00:00
Greg Beaver
bfbe53eeb2 refactor isTar/isZip/isPhar into isFileFormat(int format) where format is one of Phar::TAR,, Phar::ZIP, Phar::PHAR
[DOC]
2008-05-02 05:05:56 +00:00
Greg Beaver
e0bc2b2be1 update TODO, re-order methods to be alphabetical, tweak extractTo to set permissions and handle NULL for files
# this also matches the docs I just committed :)
2008-05-02 04:44:39 +00:00
Greg Beaver
0a3fc4faba fix unix-only valgrind issue by initializing arch 2008-04-30 23:44:30 +00:00
Greg Beaver
483018e170 remove unneeded exception handling (webPhar is always within an outer zend_execute block which handles exceptions for us, this is unnecessary) 2008-04-30 02:20:48 +00:00
Steph Fox
8559a2dbde - Prevent phars with empty manifests flushing to disk
- This would've fixed that test... removing clean section

@Greg: I commented out the call that breaks the Windows build, pending a decision about its future.
2008-04-29 12:06:54 +00:00
Greg Beaver
984ea1f437 fix segfault (now all tests pass here) 2008-04-28 23:00:46 +00:00
Greg Beaver
7220c19556 fix tar generation - we were subtly corrupting the header with \0 because of use of strcpy 2008-04-28 16:44:53 +00:00
Greg Beaver
5da6c48f7d add open_basedir/safe_mode checks for files in Phar::addFile() 2008-04-27 23:59:41 +00:00
Steph Fox
bcd2ddd018 - Kill another one from the gcov site's parameter parsing report 2008-04-27 16:42:03 +00:00
Steph Fox
2ea698eae7 - Make it possible to extract all *and* overwrite 2008-04-27 11:26:15 +00:00
Steph Fox
77dcb8cffd - Kill a few uninitialized vars (thanks gcov) 2008-04-27 10:14:00 +00:00
Greg Beaver
79a45a9666 fix buildfromiterator base to exclude directory separator on unix or windows, fix 10 test to have new tests 2008-04-26 17:09:58 +00:00
Steph Fox
cf7f50e42c - Added a RecursiveIterator/buildFromIterator test
- Fixed up bug13727.phpt to take < 15 minutes :\\ and clean up after itself
- Cleaned up protos/reflection data
- Added myself to package.xml credits
2008-04-26 13:22:38 +00:00
Greg Beaver
0c2f3b760a add Phar::extractTo(dest_directory[, mixed files[, bool overwrite]])
this is very similar to ext/zip's extractTo and is based on that code, with the addition of the third parameter, which
is used to allow overwriting existing files (disallowed by default, unlike ext/zip's implementation)
[DOC]
2008-04-26 05:31:00 +00:00
Steph Fox
dbb4618bd5 - cs 2008-04-26 02:04:09 +00:00
Steph Fox
f040cb6492 - fixed those pesky memleaks 2008-04-26 01:52:22 +00:00
Steph Fox
9bf8d7429e - implemented Phar::buildFromDirectory
@Greg: There are two (identical) recurring memleaks I can't seem to kill, both marked FIXME. Would you please take a look?

[DOC] $phar->buildFromDirectory(dirname[, regex]). Return value is an array pairing each file in the archive index with the original path on the filesystem.
2008-04-25 21:37:41 +00:00
Greg Beaver
8657ab7e5a add test for bug #13727, fix bug #13727 2008-04-25 16:50:22 +00:00
Greg Beaver
84004bf248 new test with code coverage for PharFileInfo::setMetadata/delMetadata, improve error messages 2008-04-25 16:05:05 +00:00
Greg Beaver
13dc477de2 new code coverage test, improve clarity of error message when chmod is used on a temp directory 2008-04-25 15:53:02 +00:00
Greg Beaver
efe519c194 fix access fault on windows, fix memleak on all platforms when accessing a temp directory via offsetGet 2008-04-25 04:34:03 +00:00
Greg Beaver
0db641af3e rework PharFileInfo->decompress and add failing test 2008-04-24 19:57:22 +00:00
Greg Beaver
91e67a4fbd test PharFileInfo::__construct, fix potential segfault, and bad logic in phar detection 2008-04-24 05:18:50 +00:00
Greg Beaver
8f0c9caac5 remove redundant unreachable code in Phar::copy, augment test, and add failing condition that needs to be fixed 2008-04-24 04:14:05 +00:00
Greg Beaver
696dafa370 new test for Phar::decompress() 2008-04-24 04:05:20 +00:00
Greg Beaver
3190bd0884 increase code coverage, fix minor memleak 2008-04-23 18:54:09 +00:00
Greg Beaver
ab1d8adb96 fix default format conversion, increase code coverage 2008-04-23 18:44:43 +00:00
Greg Beaver
3b8fc7309f new test increases code coverage, fix memleak found by test 2008-04-23 18:30:53 +00:00
Greg Beaver
c034683550 new test for Phar::isValidPharFilename. Fix Phar::isValidPharFilename. Fix extension detection for all cases 2008-04-23 18:11:20 +00:00
Greg Beaver
19088c1930 remove/move unreachable code 2008-04-23 17:23:32 +00:00
Greg Beaver
1dc190e680 improve rewrite callback support, add test for callback that does not return string/false 2008-04-23 17:18:28 +00:00
Greg Beaver
ce5732112e new test for invalid rewrite callback 2008-04-23 16:47:12 +00:00
Greg Beaver
76b8f30659 new test for webPhar with phar.extract_list 2008-04-23 16:00:06 +00:00
Greg Beaver
5224d341b6 ensure freeing of cwd/name happens in all cases 2008-04-22 17:34:00 +00:00
Greg Beaver
0338b28939 re-enable disabled cwd code 2008-04-22 17:19:06 +00:00
Greg Beaver
d8b4c2795e remove unreachable code, add test for large non-php file 2008-04-22 17:17:29 +00:00
Greg Beaver
379bcf1f14 remove unreachable code 2008-04-22 17:13:07 +00:00