Skip to content

Commit

Permalink
fix(核心): 修复缓存缩略图在 Windows 环境下生成错误路径问题
Browse files Browse the repository at this point in the history
  • Loading branch information
medz committed Nov 29, 2018
1 parent f024c88 commit c32ee17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/FileStorage/Filesystems/LocalFilesystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public function response(ResourceInterface $resource, ?string $rule = null): Res
return $this->filesystem->response($resource->getPath());
}

$pathinfo = \League\Flysystem\Util::pathinfo($realPath);
$pathinfo = \League\Flysystem\Util::pathinfo($resource->getPath());
$cachePath = sprintf('%s/%s/%s.%s', $pathinfo['dirname'], $pathinfo['filename'], $rule->getFilename(), $pathinfo['extension']);
if ($this->filesystem->has($cachePath)) {
return $this->filesystem->response($cachePath);
Expand Down

0 comments on commit c32ee17

Please sign in to comment.