1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-16 11:21:18 +03:00

Don't rename read-only files in sketch on save (which becomes save-as).

http://code.google.com/p/arduino/issues/detail?id=639
This commit is contained in:
David A. Mellis
2011-09-16 12:45:24 -04:00
parent f77de7e8c0
commit 026794f1eb

View File

@ -707,8 +707,7 @@ public class Sketch {
"need to re-save this sketch to another location.");
// if the user cancels, give up on the save()
if (!saveAs()) return false;
}
} else {
// rename .pde files to .ino
File mainFile = new File(getMainFilePath());
File mainFolder = mainFile.getParentFile();
@ -723,6 +722,7 @@ public class Sketch {
for (File pdeFile : pdeFiles)
renameCodeToInoExtension(pdeFile);
}
}
for (int i = 0; i < codeCount; i++) {
if (code[i].isModified())