file save inside itself

hi, the following program ran ok initially.
I changed some of the code but reverted it to as you see it below
tried to run it
I then got the following message "the system cannot find file specified error compiling to Arduino board"
I tried to save the file again but when I clicked on it, it opened up a folder inside itself, and the computer commnented "you cannot save a file inside itself"...which I understand
I copied and pasted the code to a new file, saved it and it ran ok

//led blink sketch

void setup() {
// set pin mode to putput
pinMode(2, OUTPUT);
}
void loop() {
// apply high voltage on the pin
digitalWrite(2, HIGH);
//delay see led on
delay(500);
// apply low voltage on the pin
digitalWrite(2, LOW);
//delay see led off
delay(2500);

}

I copied and pasted the code to a new file, saved it and it ran ok

So, what is your programming issue?

fair comment; why is the file opting to file itself, within itself technically?

Mfa5Mfa5:
fair comment; why is the file opting to file itself, within itself technically?

I have no idea what OS you are using, what version of the IDE you are using, or what you are doing that makes this happen. Whatever the answers are, you do NOT have a programming issue, so you are posting in the wrong place.

It sounds like overwrite existing sketch not possible · Issue #6416 · arduino/Arduino · GitHub

If so, a fix has been made for it and it's already available in the beta build if you want to try it out:

Please note the beta build is intended to be used for beta testing and you might encounter some newly introduced bugs when using it.