Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FSOpenIterator returns -43



On Wed, 2 Jul 2008 14:59:40 "Sorin Negoita" <email@hidden> wrote:

Are you sure you test it using just one process ? I use to run this code in a loop with a sleep to have enough time to unmount/
mount the stick. If I restart my process after unmount/mount, everything works perfect.

I was testing it from within a single run of a GUI app where the code mentioned was called as result of menu command. Indeed, if I do this from a command line app that doesn't run events in a for (;;) loop with a "sleep" I observe what you are talking about (though the error returned back from OpenIterator call is -36 = "I/O error (bummers)". While FSPathMakeRef call succeeds).

Interestingly, when testing in a GUI app (that runs event loop)
the FSRefs returned to me by FSPathMakeRef are different --
checked with CompareFSRefs -- even if I *do not* unmount/remount
the disk, while when testing in the CLI app (that doesn't run
events) the FSRefs returned are equal (even after unmount/remount).

I think this might be explained this way: File Manager does some
updating of its internal structures (apparently volume list) only
if you run event loop. Whether this is a bug or a feature, hmm...
Some FM calls are affected by this caching (e.g. OpenIterator) while
some don't (e.g. FSPathMakeRef). As a workaround, can you run
event loop (Carbon, Cocoa or CF)?

My stick is FAT-16 if that matters.

Mike
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden
References: 
 >Re: FSOpenIterator returns -43 (From: "Mike Kluev" <email@hidden>)
 >Re: FSOpenIterator returns -43 (From: "Sorin Negoita" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.