Skip to content

Commit 2ad17a6

Browse files
committed
1 parent 23c06a5 commit 2ad17a6

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)