From 27b54d330a3c5f3ad971cf0d91350b817f00189f Mon Sep 17 00:00:00 2001 From: Valerio Monti <97170623+valeriomonti@users.noreply.github.com> Date: Mon, 10 Oct 2022 15:39:33 +0200 Subject: [PATCH] fix(acf-composer): Fix relative path when using ACF Composer inside of a plugin (Fixes #125) (#133) --- src/AcfComposer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AcfComposer.php b/src/AcfComposer.php index 8e2766ae..228a3a39 100644 --- a/src/AcfComposer.php +++ b/src/AcfComposer.php @@ -89,7 +89,7 @@ public function registerPath($path, $namespace = null) foreach ((new Finder())->in($paths->toArray())->files()->sortByName() as $file) { $relativePath = str_replace( - $this->app->path() . DIRECTORY_SEPARATOR, + Str::finish($path, DIRECTORY_SEPARATOR), '', $file->getPathname() );