Skip to content

Commit

Permalink
Merge pull request #15446 from AUTOMATIC1111/re-add-update_file_entry
Browse files Browse the repository at this point in the history
re-add update_file_entry
  • Loading branch information
AUTOMATIC1111 authored Apr 6, 2024
2 parents 23c06a5 + 2ad17a6 commit c16a27c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions modules/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,11 @@ def reset(self):
"""Clear the cache of all directories."""
self.cached_dirs.clear()

def update_file_entry(self, path):
"""Update the cache for a specific directory."""
dirname, filename = os.path.split(path)
if cached_dir := self.cached_dirs.get(dirname):
cached_dir.update_entry(filename)

def topological_sort(dependencies):
"""Accepts a dictionary mapping name to its dependencies, returns a list of names ordered according to dependencies.
Expand Down

0 comments on commit c16a27c

Please sign in to comment.