From a559dfed4eeb124018cc869d8807a57a6253c55a Mon Sep 17 00:00:00 2001 From: Damien MATHIEU Date: Tue, 20 Dec 2022 19:17:55 +0100 Subject: [PATCH] Bugfix paths on Windows. On windows the basePath does not necessarily start with a slash or backslash. See : https://github.com/wintercms/storm/pull/72#issuecomment-1359729709 --- src/Support/ClassLoader.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Support/ClassLoader.php b/src/Support/ClassLoader.php index 1645432cb..e43a44e56 100644 --- a/src/Support/ClassLoader.php +++ b/src/Support/ClassLoader.php @@ -158,7 +158,7 @@ class_alias($alias, $class); */ protected function resolvePath(string $path): string { - if (!Str::startsWith($path, ['/', '\\'])) { + if (!Str::startsWith($path, ['/', '\\', $this->basePath . DIRECTORY_SEPARATOR])) { $path = $this->basePath . DIRECTORY_SEPARATOR . $path; } return $path;