Exempted writable modes from bundle check on OS X since bundle areas are typically read-only.
--- a/src/file/cocoa/SDL_rwopsbundlesupport.m Sat May 08 01:12:55 2010 -0700
+++ b/src/file/cocoa/SDL_rwopsbundlesupport.m Sat May 08 04:52:17 2010 -0700
@@ -12,6 +12,12 @@
{
FILE* fp = NULL;
+ // If the file mode is writable, skip all the bundle stuff because generally the bundle is read-only.
+ if(strcmp("r", mode) && strcmp("rb", mode))
+ {
+ return fopen(file, mode);
+ }
+
NSAutoreleasePool* autorelease_pool = [[NSAutoreleasePool alloc] init];
--- a/test/automated/rwops/Test_rwopsbundlesupport.m Sat May 08 01:12:55 2010 -0700
+++ b/test/automated/rwops/Test_rwopsbundlesupport.m Sat May 08 04:52:17 2010 -0700
@@ -12,6 +12,12 @@
{
FILE* fp = NULL;
+ // If the file mode is writable, skip all the bundle stuff because generally the bundle is read-only.
+ if(strcmp("r", mode) && strcmp("rb", mode))
+ {
+ return fopen(file, mode);
+ }
+
NSAutoreleasePool* autorelease_pool = [[NSAutoreleasePool alloc] init];
--- a/test/automated/rwops/rwops.c Sat May 08 01:12:55 2010 -0700
+++ b/test/automated/rwops/rwops.c Sat May 08 04:52:17 2010 -0700
@@ -227,7 +227,6 @@
/* Run read tests. */
#if __APPLE__
- /* Cheating: Using private API in SDL */
fp = Test_OpenFPFromBundleOrFallback( RWOPS_READ, "r" );
#else
fp = fopen( RWOPS_READ, "r" );
@@ -243,7 +242,6 @@
/* Run write tests. */
#if __APPLE__
- /* Cheating: Using private API in SDL */
fp = Test_OpenFPFromTemporaryDir( RWOPS_WRITE, "w+" );
#else
fp = fopen( RWOPS_WRITE, "w+" );