Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Patch to msdosfs to hide dotfiles
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Patch to msdosfs to hide dotfiles



I have a USB key that sees about equal use on Mac and Windows machines. When using the thing on Windows machines, the various dotfiles that OS X leaves on the filesystem can be distracting since Windows doesn't hide them as OS X and Unix do. To fix this, I made a patch to msdosfs that sets the 'hidden' and 'system' FAT attributes on files created with or renamed to names beginning with periods, thereby allowing Windows' Explorer to hide such files similarly to OS X's Finder:

http://pknet.com/~joe/msdos-hidden-dotfiles.patch.bz2

The patch is made against the msdos-48 tarball from the Darwin 7.4 source distribution at http://www.opensource.apple.com/darwinsource/10.3.4/. It could use some extra sets of eyes before being applied to anything:
* Since the msdosfs_rename function is a bit hairy and hard to follow, I'm not
sure if the attribute-setting code is in the best place in that function. In
particular, a well-timed error might cause the dot-ness (for lack of a better
term) of the filename to get out of sync with the set attributes.
* It'd probably be a good idea to make this a mount option rather than fixed
behavior. However, should setting the attributes be the default behavior that
a switch could turn off, or should it be special behavior requiring a switch to
activate?

(Forgive me if this isn't the right venue to discuss or submit patches to Darwin; Apple's website isn't terribly clear about the best way or place to do so.)

-Joe
_______________________________________________
darwin-kernel mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-kernel
Do not post admin requests to the list. They will be ignored.




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.