From 70adc638daf522541ea8de2b20087008fb5058e5 Mon Sep 17 00:00:00 2001 From: Jason Varga Date: Wed, 18 Dec 2024 12:00:46 -0500 Subject: [PATCH] wip --- src/Providers/AddonServiceProvider.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Providers/AddonServiceProvider.php b/src/Providers/AddonServiceProvider.php index 5667b25698..ac085ae790 100644 --- a/src/Providers/AddonServiceProvider.php +++ b/src/Providers/AddonServiceProvider.php @@ -17,6 +17,7 @@ use Statamic\Facades\Addon; use Statamic\Facades\Blueprint; use Statamic\Facades\Fieldset; +use Statamic\Facades\Path; use Statamic\Fields\Fieldtype; use Statamic\Forms\JsDrivers\JsDriver; use Statamic\Modifiers\Modifier; @@ -860,6 +861,9 @@ private function shouldBootRootItems() // i.e. It's the "root" provider. If it's in a subdirectory maybe the developer // is organizing their providers. Things like tags etc. can be autoloaded but // root level things like routes, views, config, blueprints, etc. will not. - return dirname((new \ReflectionClass(static::class))->getFileName()) === $addon->directory().$addon->autoload(); + $thisDir = Path::tidy(dirname((new \ReflectionClass(static::class))->getFileName())); + $autoloadDir = $addon->directory().$addon->autoload(); + + return $thisDir === $autoloadDir; } }