Ticket #21936: patch-src-core-misc.cpp.patch
File patch-src-core-misc.cpp.patch, 1.1 KB (added by m.doppler@…, 15 years ago) |
---|
-
src/core/misc.cpp
old new 64 64 #define EIT( x ) { OSErr err = x; if (err != noErr) throw 1; } 65 65 try 66 66 { 67 short vRefNum = 0; 68 long dirId; 69 EIT( ::FindFolder( kOnAppropriateDisk, 67 FSRef fsref; 68 EIT( ::FSFindFolder( kOnAppropriateDisk, 70 69 kApplicationSupportFolderType, 71 70 kDontCreateFolder, 72 &vRefNum, 73 &dirId ) ); 74 75 // Now we have a vRefNum and a dirID - but *not* an Unix-Path as string. 76 // Lets make one based from this: 77 FSSpec fsspec; 78 EIT( ::FSMakeFSSpec( vRefNum, dirId, NULL, &fsspec ) ); 79 80 // ...and build an FSRef based on thes FSSpec. 81 FSRef fsref; 82 EIT( ::FSpMakeFSRef( &fsspec, &fsref ) ); 71 &fsref ) ); 83 72 84 73 // ...then extract the Unix Path as a C-String from the FSRef 85 74 unsigned char path[512];