Skip to content

Commit aa7ed43

Browse files
committed
Make sure the "roundcube/roundcubemail" install path never changes
1 parent de87a3c commit aa7ed43

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

src/ExtensionInstaller.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,15 @@ protected function setRoundcubemailInstallPath(InstalledRepositoryInterface $ins
3636

3737
if ($roundcubemailPackage === $rootPackage) { // $this->getInstallPath($package) does not work for root package
3838
$this->initializeVendorDir();
39-
$this->roundcubemailInstallPath = dirname($this->vendorDir);
39+
$installPath = dirname($this->vendorDir);
4040
} else {
41-
$this->roundcubemailInstallPath = $this->getInstallPath($roundcubemailPackage);
41+
$installPath = $this->getInstallPath($roundcubemailPackage);
42+
}
43+
44+
if ($this->roundcubemailInstallPath === null) {
45+
$this->roundcubemailInstallPath = $installPath;
46+
} elseif ($this->roundcubemailInstallPath !== $installPath) {
47+
throw new \Exception('Install path of "roundcube/roundcubemail" package has unexpectedly changed');
4248
}
4349
}
4450

0 commit comments

Comments
 (0)