The disappearance of what is inside the file?

When I was working on a file, the electricity was disconnected from the computer and then I opened the file again and see this

Note: I have saved the file several times before the power outage

Atom has a rare bug that happens unpredictably when catastrophic crashes happen where it can overwrite the contents of files being worked on. Since this bug hasn’t been reliably reproduced, it can’t be fixed until someone figures out exactly what is going on.

1 Like

Interesting thread above.
I have followed the tip to install project-history package.
Correction: this package is named “local-history”

The post which appears to match the profile of this present day thread is cited below … that is, uncontrolled shutdown as in “electricity was disconnected” …

[rvnash]

Sep '18

I can reproduce it every time. Here are the steps.

Using a Mac w/ Atom version 1.30.0 x64

  • Create new file(s), type some text into them and save it
  • Leave the files open in various tabs
  • Press and hold down the power key until the computer turns off suddenly (don’t shut down normally)
  • Turn back on the computer and say to start all apps.
  • When Atom comes back up, all the files that you left will be blank, and the files will be zero bytes.
1 Like

Another insurance policy against loss of data due to hard crash is to install atom-watcher. I now use this for running sync commands on file changes but it can be used to auto backup. Read “Usage” and there is reference to node-watch-changes which acts on rules in a local file watchConfig.js which is placed in your project directory. An rsync example is given so onchange the file content can be backed up.

I have read that local-history requires files to first be saved before it takes effect.