I have a side effect on the NSFileManager::copyItemAtPath:toPath:error: change above.
My binary is being distributed as a .dmg and does not only contain the .app but also a ReadMe.
SUDiskImageUnarchiver::extractDMG fails with an error because it cannot copy the mountPoint using NSFileManager::copyItemAtPath
I patched this by iterating over the contained files in mountPoint and copying only files with an .app extension.
I am not sure why this ever worked in the previous FSCopyObjectSync implementation.
My proposal would be this single patch: http://dl.dropbox.com/u/1963886/201111-Sparkle.zip
As a sidenote: in addition the error returned from NSFileManager::copyItemAtPath:toPath:error: is not being logged, which did cost me a while to nail down the problem in the framework.
Fixes #109: Error extracting dmg archives
Thanks for investigating this issue, Berbie. I've landed your patch, with some modifications:
– we can't use fast enumeration, since we support 10.4.
– we support payloads that aren't .apps.
Thanks, andy! My donation to your project is on it's way…
You should also check for isReadableFileAtPath:, as was done in the past. Otherwise it will fail to copy unreadable files that often are in the .dmg, but that certainly are not of interest for installation.