Skip to content

Commit 2ae46b7

Browse files
authored
Fix the race condition (#4558)
1 parent c38a5de commit 2ae46b7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

scapy/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def _probe_xdg_folder(var, default, *cf):
7373
# https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
7474
# "If, when attempting to write a file, the destination directory is
7575
# non-existent an attempt should be made to create it with permission 0700."
76-
path.mkdir(mode=0o700)
76+
path.mkdir(mode=0o700, exist_ok=True)
7777
return path.joinpath(*cf).resolve()
7878

7979

0 commit comments

Comments
 (0)