Description
There are currently a number of issues that become most visible when the period function is used to refresh file information, but that also affect different lf functions regardless.
Examples are: #1417 #1172 #1226 #776
The issues can be categorized as follows:
- an internal function makes file changes that are not correctly updated
- an external process makes file changes that are not correctly updated
I would like to use this issue to discuss possible solutions
To address changes done by internal functions, we could introduce some kind of forceload command to be executed after things like copying files in order to manually refresh the file information that may have changed.
To address external changes, we would need to check for file changes periodically, which needs to be efficient to avoid increased load.
The load function that is also periodically run by the period feature, only checks for modifications of the current directory and ignores changes to files.
Instead of checking the mtime of directories in the checkDir() function, we could check all files in the currently selected pane. This could be limited to the currently listed files to avoid increased loads in case of large directories. Using ctime instead would also catch metadata changes like permissions.