mirror of
https://github.com/archtechx/tenancy.git
synced 2026-09-20 15:14:03 +00:00
rtrim directory and public root in remove symlinks action
realpath() already returns paths without the trailing separator -- rtrim is used just so that the code is more self=documenting.
This commit is contained in:
parent
9e890e9a67
commit
9ec732cfce
1 changed files with 1 additions and 1 deletions
|
|
@ -66,7 +66,7 @@ class RemoveStorageSymlinksAction
|
|||
|
||||
// Remove the directories CreateStorageSymlinksAction created for the symlink
|
||||
// until a non-empty one is reached.
|
||||
while (str_starts_with($directory, $publicRoot . DIRECTORY_SEPARATOR) && $files->isEmptyDirectory($directory)) {
|
||||
while (str_starts_with(rtrim($directory, '/\\'), rtrim($publicRoot, '/\\') . DIRECTORY_SEPARATOR) && $files->isEmptyDirectory($directory)) {
|
||||
$files->deleteDirectory($directory);
|
||||
|
||||
$directory = dirname($directory);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue