$this->cdata = '';
switch ($name) {
case 'dir':
- if (isset($this->dir_names)) {
+ if ($attribs['name'] != '/') {
$this->dir_names[] = $attribs['name'];
- } else {
- // Don't add the root dir
- $this->dir_names = array();
}
if (isset($attribs['baseinstalldir'])) {
$this->dir_install = $attribs['baseinstalldir'];
case 'file':
$this->current_file = $data;
$path = '';
- if (!empty($this->dir_names)) {
+ if (count($this->dir_names)) {
foreach ($this->dir_names as $dir) {
$path .= $dir . DIRECTORY_SEPARATOR;
}
$this->destdir = '';
$this->pkginfo['filelist'] = array();
$this->filelist =& $this->pkginfo['filelist'];
+ $this->dir_names = array();
$this->in_changelog = false;
// read the whole thing so we only get one cdata callback