We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4e08afa commit 13e38d8Copy full SHA for 13e38d8
checksec/__main__.py
@@ -30,11 +30,14 @@
30
def walk_filepath_list(filepath_list: List[Path], recursive: bool = False) -> Iterator[Path]:
31
for path in filepath_list:
32
if path.is_dir() and not path.is_symlink():
33
- if recursive:
34
- for f in os.scandir(path):
35
- yield from walk_filepath_list([Path(f)], recursive)
36
- else:
37
- yield from (Path(f) for f in os.scandir(path))
+ try:
+ if recursive:
+ for f in os.scandir(path):
+ yield from walk_filepath_list([Path(f)], recursive)
+ else:
38
+ yield from (Path(f) for f in os.scandir(path))
39
+ except PermissionError:
40
+ continue
41
elif path.is_file():
42
yield path
43
0 commit comments