Whenever the icon database in WebKit is created, it creates the ~/Library/Icons folder, *overwriting anything that's already there*. If people don't know to keep their stuff out of the Library folder, it causes data loss. I am short on details for where exactly this applies since it has happened to a user of my product who sent me an email telling me that my product is misbehaving, but it is certainly reproducible using the WebKit that's used with Safari 3.1.
I should note that I created the bug with a severity as critical since it triggers data loss when it happens, even if it is perhaps unlikely to happen, especially with the icon database being disabled by default in order to not put WebKit into multi-threaded mode lately.
I can't reproduce this issue. I tried the latest WebKit nightly, ran it, visited some sites with icons, and quit. My default ~/Library/Safari/WebpageIcons.db database was modified, but no ~/Library/Icons file or directory was created... "but it is certainly reproducible using the WebKit that's used with Safari 3.1." Can you provide some exact steps to reproduce?
I should note that my product contains the following workaround code in its awakeFromNib method, which might be what triggers the bug: // http://bugs.webkit.org/show_bug.cgi?id=16296 says: // "Calling [WebIconDatabase sharedIconDatabase] is enough to instantiate the // global icon database, enable it, and result in icon loads. Slapping that // one-liner into your - (void)setupIconDatabase; method made it work. // // It really sucks that the only way to enable part of the API is to use SPI // (granted, very stable SPI that's been around forever) but the alternative is to // have the overhead of icon loads and multithreading for *all* WebKit apps, which // is entirely unacceptable." @try { Class webIconDatabaseClass = NSClassFromString(@"WebIconDatabase"); if (webIconDatabaseClass != Nil) { [webIconDatabaseClass performSelector:@selector(sharedIconDatabase)]; } } @catch (NSException *exc) { #pragma unused(exc) } Without this code, I never got any icon delegate messages at all. (For more details on that, see the bug referenced.)