d0k3 / GodMode9

GodMode9 Explorer - A full access file browser for the Nintendo 3DS console :godmode:
GNU General Public License v3.0
2.15k stars 194 forks source link

[REQUEST] Automatic Removal of all ._ files & .DS_STORE files, etc. #275

Closed Moire9 closed 6 years ago

Moire9 commented 6 years ago

Hey, d0k3. These files are a massive annoyance, and I would really like it for you to add the feature to automatically remove the macOS hidden files. Ideally, this would happen when GM9 boots, when the bootloader loads, and when the SD card is remounted. Here is a list of all the hidden files I've seen: Any file starting with ._ [will always be a file, even if original file is folder] .DS_STORE (note there will also be ._.DS_STORE files) [file] System Volume Information [folder] .Trashes [folder] .fseventsd [folder] .Spotlight-V100 [folder] There may be more. It should be noted that the ._ files will always be precisely 4,096 Bytes, and the .DS_STORE files will always be precisely 6,148 Bytes. The ._.DS_STORE files will always be precisely 4,096 Bytes. Please implement this, you would be doing the macOS community a huge favor!

ihaveamac commented 6 years ago

I would suggest not automatically removing them, but maybe hiding them since those are of no use to homebrew. maybe do it with a build-time flag if you don't want to hide anything by default.

d0k3 commented 6 years ago

As I already said: nope. These files are already excluded in the file selector, and they are not detected as any filetype. I won't "fix" a cosmetic problem by deleting files without asking the user. Build time switch: maybe. We can discuss this, @ihaveamac. Closing this now.

Moire9 commented 6 years ago

@d0k3 Actually, they are not only a cosmetic problem. I can think of one example where it does effect homebrew, in a bad way. SysUpdater installs any .cia's in 0:/updates/, however if you have mac hidden files, say ._00040003011A73BG.cia, it will throw an error, and it took me about 10 minutes to figure out the problem. Luckily, it does not actually install the "fake" cia's (if it did, a lot of people would be bricked), but it took me about 10 minutes to find the problem. Another less important problem is that "fake" homebrew apps show up in the HBL. So, say what you want, I'll still be for deleting them. Perhaps you can disable it by default, but allow them to set it to do so, similar to what @ihaveamac said? That's a good solution, but it would be better if it wasn't a build flag but an option. Ideally, HOME -> More... -> Enable(/disable) Mac hidden file deletion. You'd probably have to figure out a better way to compress that into a few words though.

d0k3 commented 6 years ago

That's even worse. Now you're asking me to fix a problem in SysUpdater and HBL by stealthily deleting files from the SD card. Ugh. This belongs into the SysUpdater / HBL repos, not here. If you really want that automated, do a separate userland "SD cleanup tool" or create a GM9 script to do that. I'm pretty sure there is also some way to turn these crap files off in Mac.

ihaveamac commented 6 years ago

sysupdater was already updated to fix the issue a long time ago by the way. but don't do automatic deletion, especially not .Trashes at least.

Moire9 commented 6 years ago

Oh, I always delete .Trashes. I never move stuff to trash from external drives, only direct deletion [CMD + OPTION + BACKSPACE], and when I do accidentally trash something, I delete .Trashes, since I just copy stuff to my Desktop then delete it. Also, for some reason I like your profile picture. @d0k3 there is no way to turn off those files. You can turn off .DS_STORE with this unofficial app, but not the hidden files. I asked Kazuma to make a hidden file deletion script if possible, but he said he couldn't since you don't allow wildcards in the rm (or whatever the delete command is) command.

d0k3 commented 6 years ago

Well, then wait for @windows-server-2003 to finish his pull request and the for command. If we get a good script for that, I may even add it to the official ones.