-
Notifications
You must be signed in to change notification settings - Fork 329
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
Recreating a folder with the same name shows files from the "old" folder #1426
Comments
Nope, I've been actually running git version with #1292 fixed (I provided you with the reproduce steps for that one). This is a different bug. I just cloned latest git HEAD and the behavior described here is still present. You can try to reproduce it like I did in the video, here are the files: https://archlinux.org/packages/core/x86_64/pam/download/ It's like lf caches the contents of the folder based on path alone when |
Thanks for clarifying. Directory caching is based on mtime, to avoid unnecessarily reloading directories. What this means is that In your example, when the first archive is extracted, I think your best options are to either extract without preserving mtimes, or add a P.S. You are right about the implementation of the directory cache, it is simply a mapping from a string path to a data structure representing a directory: |
Got it. If this is by design, I will close this bug. Can you confirm that this is the case? |
Yeah, relying on mtime is an intentional design decision, otherwise |
OK, thank you for the explanation. Closing. |
@joelim-work Since
This does seem to work for the simple case, but I think maybe we may need to delete everything recursively so subdirectories in the cache would also be removed. I think this might also be required for the |
@gokcehan I guess there's no problem with deleting cache entries upon That being said, I don't much opinion on this either way. |
Say I have two archives and they both contain a folder with the same name, e.g. "etc", but with different files inside the folder.
Extract the first archive, go into the "etc" folder, then go back and delete the "etc" folder.
Then extract the second archive and go into the "etc" folder again, and you will notice that it does not display the files from the second archive, but from the first one.
Calling "reload" while inside the folder fixes things and the files from the second archive appear.
The explanation is a bit clumsy so I made a video:
https://www.youtube.com/watch?v=rrr2im5I5N0
Regards,
Igor
EDIT: Setting
set dircache false
fixes this... so I assume it has something to do with how the cache is implemented...The text was updated successfully, but these errors were encountered: