Create 2 libraries with the manifest libraryname field as follows:
<libraryname>mycompany/mylibrary1</libraryname>
<libraryname>mycompany/mylibrary2</libraryname>
Both successfully installed and accessible / usable by my component.
Make a change to mylibrary1 and install the new version (do not uninstall ... just run the installer).
mylibrary1 updated.
mylibrary2 not changed.
mylibrary1 updated.
mylibrary2 files in JPATH_SITE/libraries/mycompany/mylibrary2 removed.
Have to uninstall both libraries and install both again.
Windows 10
PHP 7.4
Problem at lines 310-314 of Installer/Adapter/LibraryAdapter.php
These should read:
if (2 === \count($elementParts))
{
Folder::delete(JPATH_MANIFESTS . '/libraries/' . $elementParts[0] . '/' . $elementParts[1]);
Folder::delete(JPATH_PLATFORM . '/' . $elementParts[0] . '/' . $elementParts[1]);
}
Correction to Additional Comments - suggested code change should read...
if (2 === \count($elementParts))
{
$folders = Folder::folders(JPATH_PLATFORM . '/' . $elementParts[0], '.', false, true, array(), array());
if (empty($folders))
{
Folder::delete(JPATH_MANIFESTS . '/libraries/' . $elementParts[0]);
Folder::delete(JPATH_PLATFORM . '/' . $elementParts[0]);
}
}
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-07-28 14:02:21 |
Closed_By | ⇒ | richard67 |
Closing as having a pull request.
@BrainforgeUK It would save us time if you would close your issue yourself when having made yourself a pull request to solve it.
As you have a proposed fix please submit a pull request