Atom revert my changes on save



I uses ExpandDrive to easily edit remote files.

Sometimes (most of the time), when I trigger a save, Atom will hang for a second or two, then revert my change (despite these changes being actually persisted by ExpanDrive to the remote file). I have to hit Undo to restore the state my file was before I save.

I guess that Atom immediately re-read the file, before ExpanDrive had the time to flush its cache. Whatever happens, it’s extremely ennoying … :confused:


Atom isn’t designed to be network aware. All of its file access assumes local filesystem interaction. And I suspect that some of the optimizations that ExpanDrive uses kind of break the “drive” metaphor. For example, it states that it supports S3. One of the limitations of S3 is that if you write to a file and then read from that same file immediately, you may or may not get back what you just wrote. Whereas when you write to a local filesystem, if you read it back immediately, you are guaranteed that if the write is successful the read gives you back what you just wrote … even when things like caches are in the way.

With that said, there are systems that treat some kinds of network storage like really slow local storage with the same kinds of guarantees. I use sshfs all the time at work and Atom never runs into the issues that you describe.

Additionally, one of the eventual goals is to make Atom more network storage aware … but I don’t know of any planned timeline for that.


FWIW, directivefs sits on top of S3 and other block cloud storage like Google’s and provides a POSIX file system with guaranteed atomicity and it’s fast. It is $7 per install per month on top of S3 charges. I’m using it on my servers and laptop and it works great. I replaced dropbox and it is more reliable and it doesn’t require any mirroring of local storage as Dropbox does.

End of advertisement.