NSHFSTypeOfFile() different behavior 10.1 and 10.2
NSHFSTypeOfFile() different behavior 10.1 and 10.2
- Subject: NSHFSTypeOfFile() different behavior 10.1 and 10.2
- From: Donald Hall <email@hidden>
- Date: Sun, 16 Mar 2003 23:45:59 -0700
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.
Don
--
Donald S. Hall, Ph.D.
Apps & More Software Design, Inc.
email@hidden
http://www.appsandmore.com
_______________________________________________
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.