Skip to content

Commit

Permalink
Merge pull request #12607 from AUTOMATIC1111/return-empty-list-if-ext…
Browse files Browse the repository at this point in the history
…ensions_dir-not-exist-

fix Return empty list if extensions dir not exist
  • Loading branch information
AUTOMATIC1111 authored Aug 16, 2023
2 parents fc3a57f + e1a2926 commit 541ef92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/launch_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ def list_extensions(settings_file):
disabled_extensions = set(settings.get('disabled_extensions', []))
disable_all_extensions = settings.get('disable_all_extensions', 'none')

if disable_all_extensions != 'none' or args.disable_extra_extensions or args.disable_all_extensions:
if disable_all_extensions != 'none' or args.disable_extra_extensions or args.disable_all_extensions or not os.path.isdir(extensions_dir):
return []

return [x for x in os.listdir(extensions_dir) if x not in disabled_extensions]
Expand Down

0 comments on commit 541ef92

Please sign in to comment.