diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c348e3f8..b263f0a3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,8 +24,6 @@ jobs: run: php artisan key:generate - name: Directory Permissions run: chmod -R 777 storage bootstrap/cache - - name: Delete symlinks - run: find public -lname '*' -delete - name: Create Database run: | mkdir -p database diff --git a/app/Models/Strategy.php b/app/Models/Strategy.php index 4a2e50fb..cda7bfac 100644 --- a/app/Models/Strategy.php +++ b/app/Models/Strategy.php @@ -66,7 +66,7 @@ class Strategy extends Model $symlink = self::getRootPath($strategy->configs['url']); $target = $strategy->configs['root'] ?: config('filesystems.disks.uploads.root'); if (! is_dir(public_path($symlink))) { - (new Filesystem())->link($target, $symlink); + @(new Filesystem())->link($target, $symlink); } // 是否需要移除旧的符号链接 $url = $strategy->getOriginal('configs')['url'] ?? '';