Skip to content

Commit

Permalink
Optimized testing client which create the directory again when the di…
Browse files Browse the repository at this point in the history
…rectory does not exist. (#4119)



Co-authored-by: 李铭昕 <[email protected]>
  • Loading branch information
liuende501 and limingxinleo authored Oct 9, 2021
1 parent 43679ae commit aac9078
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,9 @@ protected function normalizeFiles(array $multipart): array

$dir = BASE_PATH . '/runtime/uploads';
$tmpName = $dir . '/' . $filename;
$fileSystem->makeDirectory($dir);
if (! is_dir($dir)) {
$fileSystem->makeDirectory($dir);
}
$fileSystem->put($tmpName, $contents);

$stats = fstat($contents);
Expand Down

0 comments on commit aac9078

Please sign in to comment.