Skip to content

Unable to rename tab in unsaved sketch #6265

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
per1234 opened this issue May 6, 2017 · 0 comments · Fixed by #6388
Closed

Unable to rename tab in unsaved sketch #6265

per1234 opened this issue May 6, 2017 · 0 comments · Fixed by #6388
Assignees
Labels
editor-refactor Related to the refactoring of the Arduino IDE's editor component Type: Bug

Comments

@per1234
Copy link
Collaborator

per1234 commented May 6, 2017

Using Arduino IDE 1.8.3 Hourly Build 2017/04/26 01:33 with Windows 7 64 bit

  • File > New
  • Tab menu > New Tab > foo > OK
  • Tab menu > Rename > bar > OK - causes error: Failed to rename "foo.ino" to "bar.ino"

clipboard02

The issue occurs with Arduino IDE 1.6.12 and newer. The issue does not occur with Arduino IDE 1.6.11 or older.

@facchinm facchinm added editor-refactor Related to the refactoring of the Arduino IDE's editor component Type: Bug labels May 8, 2017
matthijskooijman added a commit to matthijskooijman/Arduino that referenced this issue Jun 16, 2017
Before 72f815b (Refactor file adding and renaming, and save as handling)
renaming a file would first save it and then rename it. Since that
commit, renaming an unsaved, newly added file would try to rename a
non-existing file on disk, causing an error message.

This is fixed by only moving the on-disk file if it exists, otherwise
just the in-memory filename is updated and the file will be written
during the next save.

Fixes: arduino#6265
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editor-refactor Related to the refactoring of the Arduino IDE's editor component Type: Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants