[issue17330] Check st_nlink in addition to st_mtime to invalidate FileFinder cache
Antoine Pitrou
report at bugs.python.org
Fri Mar 1 21:08:36 CET 2013
Antoine Pitrou added the comment:
> Put another way, the cache associated with a FileFinder only keeps
> track of the filenames in a directory, and not their individual
> mtimes. So if a new file is added to the directory the cache should
> be invalided. Likewise if a file is removed.
True, but if a file is removed and another added, st_nlink won't change.
Which will lead to even harder to find bugs.
I agree it would be better if it were always possible to detect
directory modifications, without any false negatives. Sadly it is not
(blame POSIX, I guess, although Windows is not better here), hence
invalidate_caches().
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17330>
_______________________________________
More information about the Python-bugs-list
mailing list