saros
saros copied to clipboard
Replacing non-text resources directly in the filesystem is not picked up by Saros
Saros/I largely ignores file content changes on the filesystem level as they are mostly covered by the document modification handler. An exception to this is the content replacement for non-text files.
If a user replaces the content of a non-text file (i.e. replaces the file while keeping the name the same), the resource replacement will not be picker up by Saros. As a result, the non-text resources will differ for the session participants. As the Saros watchdog does not cover non-text resources, this inconsistency will never be noticed by Saros during the running session.
Solution Approach
We could check in LocalFilesystemChangeHandler.generateEditorSavedActivity(...) whether the content change was for a non-text resource and subsequently create a deletion and creation activity (or a "content changed" activity if #941 has been resolved yet) to transfer the content change. Subsequently, the method generateEditorSavedActivity(...) should be renamed to be more general (or the logic should be split off into a separate method).