Saving files via sshfs triggers multiple "change event"

#1

Hi!

Our team uses atom to work on web projects remotely via sshfs. When we save a file, our build sequence starts (it’s web projects where we recompile TS and SCSS files on save)

The situation is the following: When Atom saves a file through the network, multiple file “change” events are triggered on the filesystem (thus triggering the build sequence several time in a row)

Here is the result of one save through sshfs using chokidar (a JS package to watch for file changes):

Selection_064

the number of “change” event triggered increases with the length of the file.

To compare, here is the result using gedit (ubuntu 16.04):

Selection_065

gedit triggers only one change (by using the temporary file to store data until all data has arrived through sshfs)

Is there a way to change atom’s behavior to mimic the one of gedit?

I’m happy with any direction as I coudn’t find any extension to do it. I could make an extension myself if that’s possible with the extension system

0 Likes