Skip to content

Commit ffbc6c1

Browse files
[5.x] Updated AddonServiceProvider::shouldBootRootItems() to support trailing slashes (#11861)
1 parent 25fd696 commit ffbc6c1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Providers/AddonServiceProvider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -863,8 +863,8 @@ private function shouldBootRootItems()
863863
// i.e. It's the "root" provider. If it's in a subdirectory maybe the developer
864864
// is organizing their providers. Things like tags etc. can be autoloaded but
865865
// root level things like routes, views, config, blueprints, etc. will not.
866-
$thisDir = Path::tidy(dirname((new \ReflectionClass(static::class))->getFileName()));
867-
$autoloadDir = $addon->directory().$addon->autoload();
866+
$thisDir = Str::ensureRight(Path::tidy(dirname((new \ReflectionClass(static::class))->getFileName())), '/');
867+
$autoloadDir = Str::ensureRight($addon->directory().$addon->autoload(), '/');
868868

869869
return $thisDir === $autoloadDir;
870870
}

0 commit comments

Comments
 (0)