Skip to content

Commit ba1603e

Browse files
committed
修正關於使用 recursive: true 的說明,強調前置檢查可能不必要
1 parent 9bc8168 commit ba1603e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/_posts/2025/race-condition-in-file-storage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ T3: 請求A 執行 mkdir(fullPath) → 成功建立目錄
2727
T4: 請求B 執行 mkdir(fullPath) → 可能拋出 EEXIST 錯誤
2828
```
2929

30-
雖然使用了 `recursive: true`但在某些作業系統或 Node.js 版本中,仍可能因為目錄已存在而拋出錯誤
30+
雖然使用了 `recursive: true`那前面的檢查很可能是不必要的行為
3131

3232
### 為什麼會這樣?
3333

0 commit comments

Comments
 (0)