-
Notifications
You must be signed in to change notification settings - Fork 328
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
Outdated file information for recreated directories #1753
Comments
This is probably related to #1426. Unlike newly created files/directories, extracted files/directories typically retain their original But I found a way to work around this using the |
Now the preview will always show the directory as empty instead.
The dircounts shows the correct number of files in the new directory though. |
Oh I fixed a bug just now in 7292788, but I think you commented before I pushed it. Can you try again? |
Still the same issue. The newly extracted directory is shown as empty |
It was working for me, but I think there's maybe one or two times where the recreated directory doesn't load for some reason and shows up as failed. I guess maybe it's not consistent, but I can't figure out why though. |
I tested this again on a fresh install and for me the bug is always present. Given a default lfrc file, the bug would not appear at all since there is no automatic file refresh, so the question may be related to how the directory is updated. There are three possible ways to trigger the bug that I found so far:
*Command I tested this with is as follows:
@joelim-work |
It's not a problem with updating the directory contents, it's a problem with stale entries in the directory cache. An entry will only be replaced if the corresponding directory has a later Anyway I ended up merging that PR after a couple more changes - it's probably a good idea to disable the |
This fixed the issue for when the watch option is used. Thank you. Extracting an archive will still show the outdated directory with the default lf options, though there is also no default extract command either.
That could be added to the wiki in order to help users without automated file refresh avoid the issue as well. |
The "default So the trick of adding Anyway I will close this issue since it's solved now. Thanks for reporting it. |
When a directory with e.g 5 files inside is deleted and then a directory with the same name recreated with 10 files inside, lf will show the directory with only 5 files, indicating the cached information for the deleted directory are reused.
This can be reproduced with an archive:
I suspect there was a similar (closed?) issue that was assumed to be fixed but I was unable to find it just now.
There have been several occasions where this bug felt quite dangerous to me as a directory that is shown as empty may be deleted without much though, thereby unintentionally deleting possibly important files.
The text was updated successfully, but these errors were encountered: