Atom: Renaming an open file and then saving it recreates the file with the original filename

Created on 12 Apr 2017  Â·  3Comments  Â·  Source: atom/atom

Prerequisites

Description

When you rename a file opened in atom using tree view or right click on the tab, the file is renamed but the file name of the opened file is not updated.
At the end:

  • if you continue editing and save, you edited the wrong file and re-created a file with the original name
  • if you close the tab without editing, atom if you want to save your work

Steps to Reproduce

  1. Create a file named "file1"
  2. Add some text and save
  3. Rename by right-clicking on the tab > rename to "file2"
    4a. close the tab -> atom asks to save the file. choosing yes will create a file named "file1"
    4b. add some text and press Ctrl+S -> will create a file named "file1" with the updated content. "file2" will be the old state of "file1"

Expected behavior: Rename action shoud be picked up by the editor and the open file should be the "new" one

Actual behavior: Only moves the file but atom ignores it

Reproduces how often: 100%

Versions

Debian Stretch
Atom 1.15 x64
Blank atom state (.atom directory removed before testing)

Most helpful comment

I believe this should be fixed by https://github.com/atom/tree-view/pull/1049

All 3 comments

I believe this should be fixed by https://github.com/atom/tree-view/pull/1049

Yes!
Fixed in atom-beta and tree-view 0.217.
Thanks and sorry for the noise.

This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!

Was this page helpful?
0 / 5 - 0 ratings