|
From: <cre...@us...> - 2006-10-29 18:56:45
|
Revision: 1582
http://svn.sourceforge.net/frontierkernel/?rev=1582&view=rev
Author: creecode
Date: 2006-10-29 10:56:33 -0800 (Sun, 29 Oct 2006)
Log Message:
-----------
on Mac, in fileloopguts function, fix a problem with CFRelease releasing data that needed to hang around
Modified Paths:
--------------
Frontier/trunk/Common/source/langevaluate.c
Modified: Frontier/trunk/Common/source/langevaluate.c
===================================================================
--- Frontier/trunk/Common/source/langevaluate.c 2006-10-26 17:29:46 UTC (rev 1581)
+++ Frontier/trunk/Common/source/langevaluate.c 2006-10-29 18:56:33 UTC (rev 1582)
@@ -536,6 +536,8 @@
//
// if ctlevels is not -1, only process files, and recurse for folders to the specified depth
//
+ // 2006-10-26 creedon: on Mac, fix a problem with CFRelease releasing data that needed to hang around
+ //
// 2006-10-03 creedon: for Mac, minimally FSRef-ized
//
// 1992-10-08 dmb: break & return must kick out of all levels of recursion (whew!)
@@ -603,6 +605,17 @@
fl = setfilespecvalue (&fs, &val);
+ #ifdef MACVERSION
+
+ // clear out path
+
+ if ( ! fl ) // don't release path if setfilespecvalue is true because val.data.filespecvalue.path needs the address
+ CFRelease ( fs.path );
+
+ fs.path = NULL;
+
+ #endif // MACVERSION
+
if (!fl)
break;
@@ -636,16 +649,6 @@
if (!fl) // user killed the script
break;
- #ifdef MACVERSION
-
- // clear out path
-
- CFRelease ( fs.path );
-
- fs.path = NULL;
-
- #endif // MACVERSION
-
} // while
fileendloop (hfileloop);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|