Skip to content

Commit

Permalink
perf: optimize existing folder detection logic
Browse files Browse the repository at this point in the history
  • Loading branch information
skymkmk committed Mar 5, 2023
1 parent 561180b commit f747804
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/init.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def init(config: dict):
# New save path if not exists
if not os.path.exists(config['save_path']):
os.makedirs(config['save_path'])
dirs = os.listdir(config['save_path'])
dirs = [i for i in os.listdir(config['save_path']) if os.path.isdir(os.path.join(config['save_path'], i))]
tmp = []
# Detect unrelated pages
for i in dirs:
Expand Down

0 comments on commit f747804

Please sign in to comment.