Merge pull request #39 from hjnasd/symlink-follow

Add support for symlinks when scanning.
pull/63/head
butaixianran 2023-03-11 20:03:45 +08:00 committed by GitHub
commit 03ef01a5de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -18,7 +18,7 @@ def scan_model(max_size_preview, skip_nsfw_preview):
# scan_log = "" # scan_log = ""
for model_type, model_folder in model.folders.items(): for model_type, model_folder in model.folders.items():
util.printD("Scanning path: " + model_folder) util.printD("Scanning path: " + model_folder)
for root, dirs, files in os.walk(model_folder): for root, dirs, files in os.walk(model_folder, followlinks=True):
for filename in files: for filename in files:
# check ext # check ext
item = os.path.join(root, filename) item = os.path.join(root, filename)