Skip to content

Commit

Permalink
Make sure the "roundcube/roundcubemail" install path never changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek committed May 3, 2024
1 parent de87a3c commit aa7ed43
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/ExtensionInstaller.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,15 @@ protected function setRoundcubemailInstallPath(InstalledRepositoryInterface $ins

if ($roundcubemailPackage === $rootPackage) { // $this->getInstallPath($package) does not work for root package
$this->initializeVendorDir();
$this->roundcubemailInstallPath = dirname($this->vendorDir);
$installPath = dirname($this->vendorDir);
} else {
$this->roundcubemailInstallPath = $this->getInstallPath($roundcubemailPackage);
$installPath = $this->getInstallPath($roundcubemailPackage);
}

if ($this->roundcubemailInstallPath === null) {
$this->roundcubemailInstallPath = $installPath;
} elseif ($this->roundcubemailInstallPath !== $installPath) {
throw new \Exception('Install path of "roundcube/roundcubemail" package has unexpectedly changed');
}
}

Expand Down

0 comments on commit aa7ed43

Please sign in to comment.