elementary / code

Code editor designed for elementary OS
https://elementary.io
GNU General Public License v3.0
477 stars 113 forks source link

"Undo" doesn't effect file operations in the folder manager #385

Open arshubham opened 6 years ago

arshubham commented 6 years ago

Don't allow moving project folder to trash or at least throw a warning. The reason is if the project folder is removed and trash is emptied later, there is no way to restore the contents. Within a project this can be mitigated by using git but removing the entire project removes .git directory making it impossible.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/56538639-undo-doesn-t-effect-file-operations-in-the-folder-manager?utm_campaign=plugin&utm_content=tracker%2F61917289&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F61917289&utm_medium=issues&utm_source=github).
danirabbit commented 6 years ago

Never use a warning when you mean "Undo" ;)

arshubham commented 6 years ago

Ok, I meant a message dialog to warn user they are about to move a project to trash

danirabbit commented 6 years ago

Over-using warnings is kind of a habit-forming anti-pattern. Check out this article: http://alistapart.com/article/neveruseawarning

arshubham commented 6 years ago

I understand but a better option here could be to close the project instead of moving it to the trash. For example vscode or atom don't allow deleting the project.

image image

Code shouldn't act as file manager