From 1d72a1b6e8a7bf9958c2a16aee82f6f1b7a58822 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Fri, 4 Sep 2020 10:44:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- System/Snowflake.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/System/Snowflake.php b/System/Snowflake.php index e7a95f3f..7ebfd6c8 100644 --- a/System/Snowflake.php +++ b/System/Snowflake.php @@ -6,6 +6,7 @@ namespace Snowflake; use Exception; use ReflectionException; +use Snowflake\Abstracts\Config; use Snowflake\Di\Container; use Snowflake\Exception\NotFindClassException; use Swoole\Coroutine; @@ -91,7 +92,8 @@ class Snowflake */ public static function getStoragePath() { - $path = realpath(static::$service->storage); + $default = APP_PATH . 'storage' . DIRECTORY_SEPARATOR; + $path = Config::get('storage', false, $default); if (!is_dir($path)) { mkdir($path); }