-
Notifications
You must be signed in to change notification settings - Fork 7.6k
[Core]: After deleting open file's parent folder, cannot Save changes and Save As shows incorrect error message #4760
Comments
To @redmunds. Marking low priority given how unlikely the scenario is, but could raise the priority if it seems like there's a more general issue. |
Copying over some thoughts from PR #5614... I wonder what the right user experience is. What do other editors do here? It seems like there are at least three options:
|
I just added more comments to pull request #5614, so be sure to read both threads! |
There's a forum thread suggesting that landing file-watchers will reduce the impact of this bug slightly: the file is correctly saved when you choose Save As, but you still see the two spurious error dialogs. |
Amending description & title (was "[Core][Keep changes in Editor]: Can not save or save as a file which is deleted from File tree but be kept in Editor.") to reflect the bug more clearly. The title didn't make it clear that this only happens when deleting folders, and the behavior has also improved slightly. |
Now that #6744 has landed, I wonder if the simplest solution here would be to just make sure the Save and Save As operations work correctly. (Save would need to recreate the parent folder chain as needed, so maybe we shouldn't fix that case and instead just make it give a clearer error message; but Save As seems like it shouldn't be hard to fix). The original options 1-3 above are all slightly nicer UI-wise, but they all seem more complex to implement as well. |
Nominating for 1.0 |
See also #8610, which is about the lesser (but still slightly confusing) issues that arise when deleting the file itself (not its containing folder). If we do something here we might want to extend it to cover that case too. |
I tried this again (since it has Brackets 1.0 Milestone). I do not see the "External Changes dialog" as stated in the Results section. The file is being saved (with "Save As", not "Save") as stated in the Expected section. So, is this now Fixed? I think the "Save" command in step 5 should behave the same as the "Save As" in step 6. Is that functionality captured somewhere else? |
Reviewed -- keeping in as low priority / opportunistic for 1.0. New plan for the simplest possible behavior:
|
Steps:
Result:
At step5, it will pop up Error saving file and can not save the file.
At step6, after you save as the file to another name, it will pop up two dialog. First dialog is Error opening file dialog, second one is External Changes dialog.
Expected:
It should can save the file, at least should save as the file without error message.
ENV: MAC10.8 English OS
Build: 0.29.0-8678
Snapshots:
Please refer to snapshots for details:
Step2:
After Step4:
After Step5:
After Step6:
The text was updated successfully, but these errors were encountered: