A large download is 90% complete when the unexpected happens, and Safari unexpectedly quits. No worries, you say, as Safari has a great feature where it resumes downloads? Well, at least sometimes it does.
I figured out how to get resuming to work after Safari crashes. Here is a little background (for some this will be enough to see what to do, for the rest of us, instructions follow). When you download some file (patch.sit) from a website, a patch.sit.download directory is made in your configured download location. In this directory (accessed via the Terminal or a Control-click and Show Package Contents in the Finder) is patch.sit and another file named Info.plist. It is this info file that is missing the data needed to resume the download.
For example, here is a copy of a download that was interrupted (the first line has been split into three lines for narrower display):
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>DownloadEntryIdentifier</key>
<string>461E69F1-6900-11D8-A675-000A95984A64</string>
<key>DownloadEntryPath</key>
<string>~/downloads/patch.sit.download/patch.sit</string>
<key>DownloadEntryProgressBytesSoFar</key>
<integer>16902</integer>
<key>DownloadEntryProgressTotalToLoad</key>
<integer>55334659</integer>
<key>DownloadEntryURL</key>
<string>http://www.mypatchsite.com/patch.sit</string>
</dict>
</plist>
Here is the same download, but after 'stopping' it using the Download window in Safari:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>DownloadEntryErrorCodeDictionaryKey</key>
<integer>-999</integer>
<key>DownloadEntryErrorDomainDictionaryKey</key>
<string>NSURLErrorDomain</string>
<key>DownloadEntryIdentifier</key>
<string>804C7812-6901-11D8-A806-000A95984A64</string>
<key>DownloadEntryPath</key>
<string>~/downloads/patch.sit.download/patch.sit</string>
<key>DownloadEntryProgressBytesSoFar</key>
<integer>135350</integer>
<key>DownloadEntryProgressTotalToLoad</key>
<integer>55334659</integer>
<key>DownloadEntryResumeInformation</key>
<dict>
<key>NSURLDownloadBytesReceived</key>
<integer>135350</integer>
<key>NSURLDownloadEntityTag</key>
<string>"23a006d-34c5703-b3dce600"</string>
<key>NSURLDownloadFileModificationDate</key>
<string>Fri, 13 Feb 2004 22:51:04 GMT</string>
<key>NSURLDownloadServerModificationDate</key>
<string>Fri, 13 Feb 2004 22:51:04 GMT</string>
<key>NSURLDownloadURL</key>
<string>http://www.mypatchsite.com/patch.sit</string>
</dict>
<key>DownloadEntryURL</key>
<string>http://www.mypatchsite.com/patch.sit</string>
</dict>
</plist>
Notice the extra XML code that's not found in the damaged download. All that is needed to resume the damaged download after crashing is to insert the missing XML. The easiest way to get this is to start downloading the file again, stop it, and then use that download directory to continue your original one:
Mac OS X Hints
http://hints.macworld.com/article.php?story=20040227044324958