Update of /cvsroot/squeak/squeak/platforms/Mac OS/vm
In directory usw-pr-cvs1:/tmp/cvs-serv28651/squeak/platforms/Mac OS/vm
Modified Files:
sqMacFileLogic.c
Log Message:
3.2.7b5 Rework how file names are build, in the quick case use UTF8. Also abort quick case earlier that solves a problem with an alias resolving issue.
Index: sqMacFileLogic.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/Mac OS/vm/sqMacFileLogic.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** sqMacFileLogic.c 17 May 2002 23:43:28 -0000 1.8
--- sqMacFileLogic.c 31 May 2002 16:48:23 -0000 1.9
***************
*** 150,167 ****
return -1;
} else {
CFRelease(filePath);
CFRelease(firstPartOfPath);
! #if defined(__MWERKS__) && !defined(__APPLE__) && !defined(__MACH__)
! filePath = CFURLCopyFileSystemPath (sillyThing, kCFURLHFSPathStyle);
! #else
! filePath = CFURLCopyFileSystemPath (sillyThing, kCFURLPOSIXPathStyle);
! #endif
CFRelease(sillyThing);
- if (filePath == null)
- return -2;
! CFStringGetCString(filePath,dst,1000, kCFStringEncodingMacRoman);
! CFRelease(filePath);
! return 0;
}
}
--- 150,177 ----
return -1;
} else {
+ CFStringRef lastPathPart;
+ char lastpart[256];
+
CFRelease(filePath);
CFRelease(firstPartOfPath);
! lastPathPart = CFURLCopyLastPathComponent(sillyThing);
CFRelease(sillyThing);
! err = noErr;
! if (resolveAlias)
! err = FSResolveAliasFile (&theFSRef,true,&isFolder,&isAlias);
!
! if (err)
! return 2;
!
! err = FSRefMakePath(&theFSRef,(UInt8 *)dst,1000);
! CFStringGetCString(lastPathPart,lastpart,256, kCFStringEncodingUTF8);
! CFRelease(lastPathPart);
! if (strlen(dst)+1+strlen(lastpart) < 1000) {
! strcat(dst,"/");
! strcat(dst,lastpart);
! return 0;
! } else
! return 2;
}
}
|