Skip to content

Commit aac9078

Browse files
Optimized testing client which create the directory again when the directory does not exist. (#4119)
Co-authored-by: 李铭昕 <[email protected]>
1 parent 43679ae commit aac9078

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Client.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,9 @@ protected function normalizeFiles(array $multipart): array
231231

232232
$dir = BASE_PATH . '/runtime/uploads';
233233
$tmpName = $dir . '/' . $filename;
234-
$fileSystem->makeDirectory($dir);
234+
if (! is_dir($dir)) {
235+
$fileSystem->makeDirectory($dir);
236+
}
235237
$fileSystem->put($tmpName, $contents);
236238

237239
$stats = fstat($contents);

0 commit comments

Comments
 (0)