Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalidate dircache on copy #564

Merged
merged 1 commit into from
Jun 28, 2023

Conversation

ianthomas23
Copy link
Contributor

Fixes #562.

_cp_file() wasn't invalidating the dircache for the target path, leading to stale cache information causing a erroneous isfile() test. Similar functions _put_file() and _rm_file() do have the cache invalidation.

Solution here is to add

self.invalidate_cache(self._parent(path2))

at the end of _cp_file().

@martindurant martindurant merged commit 27e681f into fsspec:main Jun 28, 2023
5 checks passed
@ianthomas23 ianthomas23 deleted the 562_stale_cache_isfile branch June 28, 2023 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Stale cache info leading to failing isfile check
2 participants