Revision: 5469
          http://skim-app.svn.sourceforge.net/skim-app/?rev=5469&view=rev
Author:   hofman
Date:     2009-07-08 20:46:27 +0000 (Wed, 08 Jul 2009)

Log Message:
-----------
fix unicode char type for temporary directory creation

Modified Paths:
--------------
    trunk/Files_SKExtensions.m

Modified: trunk/Files_SKExtensions.m
===================================================================
--- trunk/Files_SKExtensions.m  2009-07-06 16:50:46 UTC (rev 5468)
+++ trunk/Files_SKExtensions.m  2009-07-08 20:46:27 UTC (rev 5469)
@@ -138,8 +138,11 @@
     
     if (create) {
         FSRef tmpRef;
+        UniCharCount length = [tmpDirName length];
+        UniChar *tmpName = (UniChar *)NSZoneMalloc(NULL, length * 
sizeof(UniChar));
+        [tmpDirName getCharacters:tmpName];
         success = noErr == FSPathMakeRef((UInt8 *)[basePath 
fileSystemRepresentation], &tmpRef, NULL) &&
-                  noErr == FSCreateDirectoryUnicode(&tmpRef, [tmpDirName 
length], (const UniChar *)[tmpDirName 
cStringUsingEncoding:NSUnicodeStringEncoding], kFSCatInfoNone, NULL, NULL, 
NULL, NULL);
+                  noErr == FSCreateDirectoryUnicode(&tmpRef, length, tmpName, 
kFSCatInfoNone, NULL, NULL, NULL, NULL);
     }
     
     return success ? [basePath stringByAppendingPathComponent:tmpDirName] : 
nil;


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to