I'm using 2.1.0 IDE on Win 10. It's been pretty well-behaved lately, but today was weird. I have 24 files in a project. I did a global search and replace (this is the first time I've used it cuz I feel it's dangerous in most cases) and it opened up a second copy of one of the files where the target of the search was found. I closed the "right-hand copy" using the corner 'X' and that one did close down. However, when I looked at the Tab list, there are now two copies of that file. One of them is "locked" in the sense I cannot edit it. The other file is not. I loaded up File Explorer and inspected its properties and was, indeed, marked Read-only. FE shows only one copy in the directory.
Did I do something wrong that resulted in this, or is this by design. If by design, is there a way to turn that feature off.
It contains instructions how to clear it (reset workbench by per1234 and an addition to that by sterretjeToo; I'm not sure if this already made it to IDE 2.1.1.
I have moved your topic to the dedicated IDE 2.x section of the forum.
That raises the question if it was actually fixed @econjack uses 2.1.0
Note:
When I encountered the issue, the second of the duplicates was not read-only; I could edit both (as far as I remember). So this might be another issue.
There have been several other reports of sketch files unexpectedly gaining read-only attributes:
One of the affected users determined it was caused by a Windows update:
Something important to understand related to this problem is that Arduino IDE intentionally treats some files as "read-only" simply based on their location outside the sketch folder. That system does not use file attributes so it is not expected that the IDE would ever add a read-only file attribute under any conditions.
When I upgraded to 2.1.1, I was having my "Exit-only" problem which caused me to drop back to 2.1.0. With this "append" problem, I decided to try 2.1.1 again. Now, 2.1.1 works fine and I have not experienced the append problem. If I do, I'll report it here.