karelia/iMedia — pull request #47 by danielpunkass (2012-03-13 19:31:41+00:00)
Title: Bug fix with NSError zombie being referenced from IMBFolderParser

Hey guys - this is a pretty serious bug. I'm not sure what circumstances cause the behavior where contentsOfDirectoryAtPath:error: returns a non-nil error on success, but I was able to produce it by dragging "/tmp" on my Mac into the Folders section of iMedia. I think the issue is some intermediate error in AppKit gets stuffed in there, but then is released when it's realized that it's not a real error.

Note that in any case these changes are consistent with the rule with NSError returning objects that the value is only valid when the failure condition for the API is met. In this case the failure condition for contentsOfDirectoryAtPath:error: is that the method returns a nil array.