mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-17 22:23:10 +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:
@ -707,8 +707,7 @@ public class Sketch {
|
|||||||
"need to re-save this sketch to another location.");
|
"need to re-save this sketch to another location.");
|
||||||
// if the user cancels, give up on the save()
|
// if the user cancels, give up on the save()
|
||||||
if (!saveAs()) return false;
|
if (!saveAs()) return false;
|
||||||
}
|
} else {
|
||||||
|
|
||||||
// rename .pde files to .ino
|
// rename .pde files to .ino
|
||||||
File mainFile = new File(getMainFilePath());
|
File mainFile = new File(getMainFilePath());
|
||||||
File mainFolder = mainFile.getParentFile();
|
File mainFolder = mainFile.getParentFile();
|
||||||
@ -723,6 +722,7 @@ public class Sketch {
|
|||||||
for (File pdeFile : pdeFiles)
|
for (File pdeFile : pdeFiles)
|
||||||
renameCodeToInoExtension(pdeFile);
|
renameCodeToInoExtension(pdeFile);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (int i = 0; i < codeCount; i++) {
|
for (int i = 0; i < codeCount; i++) {
|
||||||
if (code[i].isModified())
|
if (code[i].isModified())
|
||||||
|
Reference in New Issue
Block a user