...
This commit is contained in:
parent
8aacf30f19
commit
2178c8e4af
1 changed files with 1 additions and 1 deletions
|
|
@ -241,7 +241,7 @@ def stat_at(file: str, cwd: Optional[Union[int, str]] = None, follow_symlinks: b
|
|||
dirfd: Optional[int] = None
|
||||
need_to_close = False
|
||||
if isinstance(cwd, str):
|
||||
dirfd = os.open(cwd, os.O_RDONLY)
|
||||
dirfd = os.open(cwd, os.O_RDONLY | getattr(os, 'O_CLOEXEC', 0))
|
||||
need_to_close = True
|
||||
elif isinstance(cwd, int):
|
||||
dirfd = cwd
|
||||
|
|
|
|||
Loading…
Reference in a new issue