Skip to content

Commit c16a27c

Browse files
Merge pull request #15446 from AUTOMATIC1111/re-add-update_file_entry
re-add update_file_entry
2 parents 23c06a5 + 2ad17a6 commit c16a27c

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

modules/util.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,11 @@ def reset(self):
148148
"""Clear the cache of all directories."""
149149
self.cached_dirs.clear()
150150

151+
def update_file_entry(self, path):
152+
"""Update the cache for a specific directory."""
153+
dirname, filename = os.path.split(path)
154+
if cached_dir := self.cached_dirs.get(dirname):
155+
cached_dir.update_entry(filename)
151156

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

0 commit comments

Comments
 (0)