[futurebasic] Re: [FB] FB No Such Volume

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : June 2012 : Group Archive : Group : All Groups

From: Ken Shmidheiser <kshmidheiser@...>
Date: Sat, 9 Jun 2012 17:44:47 -0400
Brian's code is good with one major exception:

If the created file is moved or trashed, the program will crash
because the CFURLRef will no longer point to a file and thus will be invalid.

I would suggest testing the global CFURLRef with fn FD_ObjectExistsCFURL
that can be found in Util_FileDirectory.incl to be sure it still exists.

The same flaw was in Ted's original code, the global FSRef could point
to a file that no longer exists, and thus cause a crash.

Ken