Re: NSHFSTypeOfFile() different behavior 10.1 and 10.2
Re: NSHFSTypeOfFile() different behavior 10.1 and 10.2
- Subject: Re: NSHFSTypeOfFile() different behavior 10.1 and 10.2
- From: Brian Webster <email@hidden>
- Date: Mon, 17 Mar 2003 16:49:49 -0600
The best thing to do would be to post a bug report at
http://bugreport.apple.com if you haven't done so already. Having the
reference here on the list is good for searchers, but it'd also be nice
to make sure that Apple fixes this.
On Monday, March 17, 2003, at 03:01 AM,
email@hidden wrote:
I spent quite a while tracking a bug in my code down, and it turned
out to be a difference in the behavior of the function
NSHFSTypeOfFile() between OS 10.1 and OS 10.2.
Here is a code snippet:
NSString *hfsFileType;
NSString *filePath;
hfsFileType = NSHFSTypeOfFile(filePath); // seems to hang for
empty file path in 10.2
NSRunAlertPanel(@"newAction test", @"hfsFileType=%@",@"OK", nil,
nil, hfsFileType);
If filePath is an empty string, in OS 10.1 the result NULL is
returned. This would be the behavior one would expect after reading
the documentation - NULL is returned if a file type can't be
determined.
However, in OS 10.2 it seems the function does not return at all if
it is passed an empty string. At least in my testing it didn't. The
alert panel comes up in 10.1 but not in 10.2.
I am posting this in the hopes of saving someone else some head
scratching time. I couldn't find any mention of this in the release
notes.
--
Brian Webster
email@hidden
http://homepage.mac.com/bwebster
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.