Skip to content

Commit

Permalink
Wow, this actually DID work!
Browse files Browse the repository at this point in the history
I still don't have an idea, how. But revert the change and fix the access level instead.
  • Loading branch information
yunosh committed Apr 7, 2017
1 parent b3a7493 commit d01524c
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions framework/Pear/lib/Horde/Pear/Package/Xml/Directory.php
Expand Up @@ -208,6 +208,19 @@ private function _deleteFile($file)
$this->_prune();
}

/**
* Delete a subdirectory from the list.
*
* @param string $dir The directory name.
*
* @return NULL
*/
public function deleteSubdirectory($dir)
{
unset($this->_subdirectories[$dir]);
$this->_prune();
}

/**
* Prune this directory if it is empty.
*
Expand All @@ -217,6 +230,9 @@ private function _prune()
{
if (empty($this->_files) && empty($this->_subdirectories)) {
$this->_element->delete();
if ($this->_parent instanceof Horde_Pear_Package_Xml_Directory) {
$this->_parent->deleteSubdirectory($this->_element->getName());
}
}
}

Expand Down

0 comments on commit d01524c

Please sign in to comment.