case 'file':
$this->current_file = $data;
$path = '';
- foreach ($this->dir_names as $dir) {
- $path .= $dir . DIRECTORY_SEPARATOR;
+ if (!empty($this->dir_names)) {
+ foreach ($this->dir_names as $dir) {
+ $path .= $dir . DIRECTORY_SEPARATOR;
+ }
}
$path .= $this->current_file;
$this->filelist[$path] = $this->current_attributes;
case 'libfile':
$this->lib_name = $data;
$path = '';
- foreach ($this->dir_names as $dir) {
- $path .= $dir . DIRECTORY_SEPARATOR;
+ if (!empty($this->dir_names)) {
+ foreach ($this->dir_names as $dir) {
+ $path .= $dir . DIRECTORY_SEPARATOR;
+ }
}
$path .= $this->lib_name;
$this->filelist[$path] = $this->lib_atts;