From 2ce2b58f64e47c2f50bc829b3d2dc2d555ae692a Mon Sep 17 00:00:00 2001 From: Xavier Date: Wed, 3 Aug 2022 10:28:30 -0400 Subject: [PATCH] fix(app): fix base path and public path for app and filesystem --- packages/app/src/Charcoal/App/AppConfig.php | 8 +++----- packages/app/src/Charcoal/App/Config/FilesystemConfig.php | 4 ++-- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/packages/app/src/Charcoal/App/AppConfig.php b/packages/app/src/Charcoal/App/AppConfig.php index 473805eb0..898755b5a 100644 --- a/packages/app/src/Charcoal/App/AppConfig.php +++ b/packages/app/src/Charcoal/App/AppConfig.php @@ -255,8 +255,6 @@ public function resolveValue($value) */ public function addFile($path) { - $path = $this->resolveValue($path); - return parent::addFile($path); } @@ -283,7 +281,7 @@ public function setBasePath($path) ); } - $this->basePath = rtrim(realpath($path), '\\/'); + $this->basePath = rtrim(realpath($path), '\\/').DIRECTORY_SEPARATOR; return $this; } @@ -317,7 +315,7 @@ public function setPublicPath($path) ); } - $this->publicPath = rtrim(realpath($path), '\\/'); + $this->publicPath = rtrim(realpath($path), '\\/').DIRECTORY_SEPARATOR; return $this; } @@ -329,7 +327,7 @@ public function setPublicPath($path) public function publicPath() { if ($this->publicPath === null) { - $this->publicPath = $this->basePath() . DIRECTORY_SEPARATOR . 'www'; + $this->publicPath = $this->basePath().'www'.DIRECTORY_SEPARATOR; } return $this->publicPath; diff --git a/packages/app/src/Charcoal/App/Config/FilesystemConfig.php b/packages/app/src/Charcoal/App/Config/FilesystemConfig.php index 57a96f37a..29c17f4bc 100644 --- a/packages/app/src/Charcoal/App/Config/FilesystemConfig.php +++ b/packages/app/src/Charcoal/App/Config/FilesystemConfig.php @@ -29,13 +29,13 @@ public function defaultConnections() 'public' => [ 'public' => true, 'type' => 'local', - 'path' => '%app.public_path%', + 'path' => './', 'label' => 'Public', ], 'private' => [ 'public' => false, 'type' => 'local', - 'path' => '%app.base_path%', + 'path' => '../', 'label' => 'Private', ], ];