Nextcloud version - 26.0.0
Operating system and version - Debian 11
Apache or nginx version : Apache 2.4.56
PHP version : php8.0
We have an application that creates and changes files in the NextCloud folders. After each change, the app executes the “occ:files scan” command to inform Nextcloud. It works nice for new files, or files that are only changed from the application.
If a text file is changed in the NC GUI (editor) and a short time later from the application, it shows a different content in NC and on disk. The “occ:files scan” does not fix the issue. The only way to fix it is to change the file date on disk (with a touch) and run the scan again. This forces NC to detect the difference and ask in the editor what version should be used.
Is there an occ command to force NC loading the file from disk after a change ?
I must admit that I’m not entirely sure if this command will fix the issue at hand, as it is primarily intended to scan the app data folder for changes.
However, I would suggest using the files:scan-app-data command additionally of files:scan where the files are being changed both through the Nextcloud GUI and the application.