mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-19 08:52:15 +01:00
beadf8fe63
Before 72f815bcf (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: #6265