Originally Posted By: roger
I'm thinking of a "normal" Mac user, and that this must happen not unfrequently. a little Finder Undo would be handy. all this plist stuff is great, but next we'll be bringing out Terminal...

Actually, the whole thing would be best wrapped in an AppleScript applet [which itself could make Unix-type calls, if necessary (e.g., not that it's needed, but if there was something that AppleScript doesn't do easily... such as defaults read perhaps, then it could be achieved via the do shell script syntax).]

So the user would run it, and a dialog would ask if we're saving a backup or restoring a poofed dock... and then it would do all the copying, process killing, etc., etc.

Anyway, it could all be reduced to double-clicking an app and then clicking one button in a dialog. The main trick will be remembering to run it early on, to save the backup plist in the first place.

EDIT: At this point i'm still not convinced that "com.apple.dock.db" is anything crucial. From what i've seen of it so far, i'd almost think we'd be doing the user a favor by *erasing* it [and letting the OS build a brand new one (smaller and cleaner) from our preserved plist.]

EDIT 2: BTW, there is also another cache for the dock, but it seems more devoted to icon data (for faster drawing i guess -- probably handy for the magnification feature):

ls -lh /var/folders/*/*/-Caches-/com.apple.dock.*

Last edited by Hal Itosis; 02/05/10 10:14 PM.