I am developing a back-end Joomla! component, but after it is installed, I see an empty folder in the site part. How I can instruct Joomla! not to create the folder in the site part?
Unfortunately the directory is always gets created. File: libraries/cms/installer/adapter.php line 679
$this->createExtensionRoot();
The above line will create the extension root directory whenever you install the component.
The workaround for this is to delete the directory after installation. In your script.php file, delete the directory during postflight phase.
function postflight ($type, $parent)
{
JFolder::delete(JPATH_ROOT.'/components/com_mycomponent');
}