- commit
- ea6440e0a88c6c15f7676103c2ae4af46c0dd159
- parent
- 49fb40614fc28f15e5c7940abf3e6862d28569d5
- Author
- Tobias Bengfort <tobias.bengfort@posteo.de>
- Date
- 2020-09-03 16:09
avoid cycles in listdir
Diffstat
| M | cplay.py | 5 | ++++- |
1 files changed, 4 insertions, 1 deletions
diff --git a/cplay.py b/cplay.py
@@ -81,7 +81,10 @@ def listdir(path): 81 81 with os.scandir(path) as it: 82 82 for entry in sorted(it, key=lambda e: e.name): 83 83 if entry.name[0] != '.':84 -1 yield entry.path, entry.is_dir()-1 84 yield ( -1 85 entry.path, -1 86 entry.is_dir(follow_symlinks=False), -1 87 ) 85 88 86 89 87 90 class Player: