Skip to content

Commit

Permalink
Update CosAdapter.php
Browse files Browse the repository at this point in the history
如果在windows环境设置 prefix=test
上传的文件路径会变成 /test\images/1.png
因为windows下 DIRECTORY_SEPARATOR = \

去掉传参 `DIRECTORY_SEPARATOR` 后, 文件路径正常
  • Loading branch information
Jesse176 authored Jul 9, 2024
1 parent a372a5b commit d0dd25e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/CosAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function __construct(array $config)
$config
);

$this->prefixer = new PathPrefixer($config['prefix'] ?? '', DIRECTORY_SEPARATOR);
$this->prefixer = new PathPrefixer($config['prefix'] ?? '');
}

/**
Expand Down

0 comments on commit d0dd25e

Please sign in to comment.