misode.github.io icon indicating copy to clipboard operation
misode.github.io copied to clipboard

Switching between projects containing files with shared name and path can overwrite files.

Open HB-Stratos opened this issue 1 year ago • 0 comments

Replication Steps

  • create a project named p1
  • create a DF in p1 and save it as 1
  • create a second project named p2
  • create a DF in p2 and also save it also named 1
  • modify the DF in p2 in any way (I created an abs with a const of zero)
  • switch to project p1 (expected -> The content of 1 from p1 replaces the content from p2)
  • switch back to project p2 --> The content of 1 from project p1 has overwritten the content of 1 from p2. The contents of the file in p2 have been destroyed. Undo can sometimes undo this change.

Proposed Fix

Make the editor force clear the selected file on project switch. Though this issue and #457 really point towards a general design flaw with the editor being global instead of actually file specific. Another consideration would be to introduce an explicit save button. The current instant autosaving is prone to overwriting files with the current issues.

HB-Stratos avatar Feb 01 '24 01:02 HB-Stratos