Commit d2e350b
committed
出力先ディレクトリが既に存在しても無視する
手動でディレクトリが存在しなかったら作るという判定を行っているが、並列
で実行している場合には、ディレクトリの存在チェック (os.path.exists) と
実際のディレクトリの作成 (os.makedirs) の間に、他のスレッドがディレク
トリを作成してしまいエラーが生じる可能性が残る (race condition)。始め
から os.makedirs の側で既に存在するディレクトリを無視するべき。
cpprefjp/site#1478 (comment)1 parent a5ea672 commit d2e350b
1 file changed
+1
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
150 | | - | |
151 | | - | |
| 150 | + | |
152 | 151 | | |
153 | 152 | | |
154 | 153 | | |
| |||
0 commit comments