mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-11-27 10:57:17 +00:00
Fixed Save As when overwriting existing sketch.
Signed-off-by: Akos Kitta <kittaakos@typefox.io>
This commit is contained in:
@@ -383,7 +383,9 @@ void loop() {
|
||||
try {
|
||||
const oldPath = path.join(destination, new URI(sketch.mainFileUri).path.base);
|
||||
const newPath = path.join(destination, `${newName}.ino`);
|
||||
await fs.rename(oldPath, newPath);
|
||||
if (oldPath !== newPath) {
|
||||
await fs.rename(oldPath, newPath);
|
||||
}
|
||||
await this.loadSketch(destinationUri); // Sanity check.
|
||||
resolve();
|
||||
} catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user