News for hackers. Stuff that matters.
Re:.DS_Store by kstenerud on Wednesday July 03, 2019 @01:40AM (#20341902)
That's not the only problem. Apple leaves a whole bunch of "mac droppings" all over the place:

https://github.com/github/gitignore/blob/master/Global/macOS...

The worst part is that .DS_Store assumes, even on remote (SMB) filesystems, that only one machine will ever be accessing the directory, and so stores things like view settings and icon positions and such. Which means that every mac computer that accesses that file share will be fighting with each other, overwriting their metadata, and sometimes triggering problems because one has half-overwritten the file while another is accessing it.

That metadata should have been stored locally on the mac (with info about what path it refers to), not on the remote system.

Overall, it's a very poorly designed feature.

Re:.DS_Store by jakobegger on Wednesday July 03, 2019 @03:34AM (#20342371)
But it was pretty neat that you could arrange icons on a floppy disks and then give it to someone else and the icons were in the same position on their computer.
Re:.DS_Store by matt-attack on Wednesday July 03, 2019 @03:35PM (#20347890)
It’s still relevant today for external drives.
Re:.DS_Store by quux on Wednesday July 03, 2019 @05:06PM (#20348787)
Disk images, which is how a lot of mac software is distributed also use this feature.
Re:.DS_Store by sfoley on Wednesday July 03, 2019 @09:31AM (#20344105)
My guess as to the reason they’re in the directory rather than a separate folder is so you can rename/move it without losing all your metadata.
Re:.DS_Store by andreareina on Wednesday July 03, 2019 @03:11PM (#20347606)
The filesystem already keeps track of moves/renames -- I can (and have) moved the files that the App Store downloads, and it still knows where they are.
Re:.DS_Store by klingonopera on Wednesday July 03, 2019 @08:18AM (#20343614)
Veto'ing these files on Linux SMB servers along with ".thumb" files is one of the most satisfying things I have ever done as a network administrator.

[1]: https://www.samba.org/samba/docs/current/man-html/smb.conf.5...

Re:.DS_Store by philshem on Wednesday July 03, 2019 @02:23AM (#20342079)
Just seeing this post among the others activates my instinct to delete the title.
Re:.DS_Store by laurent123456 on Wednesday July 03, 2019 @06:39AM (#20343123)
Re:.DS_Store by klingonopera on Wednesday July 03, 2019 @08:28AM (#20343663)
These temporary files are terrible! I don't know which major Windows version started with the ".thumb" and "desktop.ini" files, but if I tell my OS to navigate and display me contents of a folder, please don't change anything in that folder! You should be assuming "read-only" as often as possible, and only assume anything else when explicitly stated to do so.

But instead, they create thumbnails. In the very same source folder. Shouldn't this stuff go on some cache in your windows directory?

Re:.DS_Store by garaetjjte on Thursday July 04, 2019 @06:15PM (#20358227)
Another thing is that 'System Volume Information' created on removable drives. And Android too creates its directory structure on every mounted drive..
Re:.DS_Store by mrguyorama on Wednesday July 03, 2019 @02:08PM (#20346883)
The wikipedia links to a similar article on the windows thumbnail cache, where it claims from Vista onward that Windows has a central cache location for thumbnail caches.
Re:.DS_Store by klingonopera on Sunday July 07, 2019 @02:33PM (#20376813)
Ah yes, that explains why "thumbs.db" is no longer a thing and was mostly remnants left over from the XP days...
Re:.DS_Store by aventrix on Wednesday July 03, 2019 @01:22AM (#20341818)
Think about the amount of man hours people have spent deleting these files from repositories, USB drives, archives... They spread like a virus.
Re:.DS_Store by paranoidrobot on Wednesday July 03, 2019 @02:30AM (#20342102)
When I set up new fileshares at work I used Filescreen templates to stop those being created on network shares (Example [1]).

Gnome creates it's own too, and I wish it would stop - the only solution seems to be to recompile libgio with the trash method redirected to delete[2].

[1] https://dea.nbird.com.au/2014/11/19/windows-server-prevent-m...

[2] https://askubuntu.com/questions/229098/how-to-i-stop-ubuntu-...

Re:.DS_Store by acomjean on Wednesday July 03, 2019 @08:07AM (#20343535)
I thought those files were a compromise when apple went to OS_X and got rid of the old "resource fork" park of the mac OS finder system. This data was part of the file, and let the operating system know which program to open the file with (even if it didn't have a .ext). But it made it hard to interopt.. But I might be a little off.

https://en.wikipedia.org/wiki/Resource_fork

http://mirror.informatimago.com/next/developer.apple.com/doc...

Re:.DS_Store by gumby on Wednesday July 03, 2019 @06:33AM (#20343107)
I have been glad these are user-visible files rather than some obscure FS metadata (xattrs) that get lost or propagated unpredictably by various tools.

The way they did it means I can delete 'em or keep 'em depending on what I want to accomplish and that the'll work on any filesystem.

Re:.DS_Store by ErikAugust on Wednesday July 03, 2019 @03:01AM (#20342215)
This has lead me to the idea of a “gitignore” for HN article title names.
Re:.DS_Store by russh on Wednesday July 03, 2019 @03:00PM (#20347499)
Not a bad idea.
Re:.DS_Store by jimbo1qaz on Wednesday July 03, 2019 @03:40AM (#20342398)
This is analogous to desktop.ini on Windows Explorer, or .directory on KDE Dolphin.
Re:.DS_Store by burfog on Wednesday July 03, 2019 @02:00PM (#20346813)
I got data loss when OLPC's Sugar desktop did this. I put the SD card into the machine to undelete something, and Sugar promptly overwrote my data by adding some useless nonsense desktop file.

For all these sorts of things, I really truly think "How dare they!" and much worse. It fills me with rage that an OS would do this.