1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-09-20 12:34:03 +00:00

Trim any trailing separator from the original storage path in tenantStoragePath

Primarily making this change for consistency with diskRoot()'s usage of rtrim (`857c6fc`).

With the current Tenancy code, this doesn't fix any real issue, but if tenantStoragePath() got publicly exposed (like in #1479), in very rare cases, issues could arise. For example, when someone configures their storage path to end with a separator, comparing the result of tenantStoragePath() to other strings could behave unexpectedly without rtrim.
This commit is contained in:
lukinovec 2026-08-27 16:17:05 +02:00
parent 3ee5a8e426
commit 10de159b88

View file

@ -97,7 +97,7 @@ class FilesystemTenancyBootstrapper implements TenancyBootstrapper
protected function tenantStoragePath(string $suffix): string
{
return $this->originalStoragePath . DIRECTORY_SEPARATOR . $suffix;
return rtrim($this->originalStoragePath, '/\\') . DIRECTORY_SEPARATOR . $suffix;
}
protected function assetHelper(string|false $suffix): void