PseudoDirEntry caching ignores follow_symlinks parameter #8
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
PseudoDirEntry caching ignores follow_symlinks parameter
Priority: Medium
Component: fs.py
Type: Bug
Description
The
PseudoDirEntryclass caches the results ofis_dir(),is_file(), andis_symlink()methods but ignores thefollow_symlinksparameter, which could return incorrect results if called with different parameter values.Location
curateipsum/fs.py:31-63Current Code
Problem
The caching doesn't account for the
follow_symlinksparameter. If you call:entry.is_dir(follow_symlinks=True)→ caches resultentry.is_dir(follow_symlinks=False)→ returns cached result from (1), which may be wrongProposed Solution
Either:
self._is_dir[follow_symlinks]Impact
Medium - Could cause incorrect behavior with symlinks if follow_symlinks is used with different values.