Deleting files on your Mac without realising
6 June 2017Update: This is fixed as of Sierra. Although Sierra has only just been adopted by 50% of OSX users.
Ever wondered how you could delete files on your Mac without even knowing it? Well today is your lucky day! I'm going to show you how.
You'll be on some application, and you feel like saving your work. Let's say you're exporting an image from preview. You go to File > Export
You open up Mac's built in save dialog by clicking the down arrow on the right hand side of the filename input.
![Opening finder from export in Preview](https://monokh.com/img/mac-builtin-file-browser.jpg)
You change the name of the image to this-is-my-image.png
![Renaming image in finder](https://monokh.com/img/mac-rename-image-created.jpg)
So far so good. Now where should I put this image? How about the my important stuff folder? Important stuff go in important places - ok - yep. You select the folder by clicking on it.
![Selecting an important folder](https://monokh.com/img/mac-select-important-stuff-folder.jpg)
You realise the filename you chose is actually really stupid. So you click back on the text box to edit it.
![Back to the filename box to rename](https://monokh.com/img/mac-go-back-to-rename.jpg)
You tap ⌘ - Backspace to delete what's inside the text box.
Nothing happens...
![Trying to erase content of box](https://monokh.com/img/mac-try-deleting-filename.jpg)
What happened? Didn't notice?
Poof your important stuff folder is gone!
In this kind of controlled environment, it is noticeable. However if this was a long list of folders, chances of noticing are slim. You would proceed to empty your trash a few days later - bye bye important files.
There are 2 faults here:
- Clash of convention - We are accustomed to using Command - Backspace to delete entire lines however Apple have a different idea about the backspace button and also use it as a delete key.
- Even worse, it still begs the question, why is an action being executed on an unfocused element?