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)

patch for liblastfm leopard compatiblity

  • src/core/misc.cpp

    old new  
    6464    #define EIT( x ) { OSErr err = x; if (err != noErr) throw 1; }
    6565    try
    6666    {
    67         short vRefNum = 0;
    68         long dirId;
    69         EIT( ::FindFolder( kOnAppropriateDisk,
     67        FSRef fsref;
     68        EIT( ::FSFindFolder( kOnAppropriateDisk,
    7069                           kApplicationSupportFolderType,
    7170                           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 ) );
    8372
    8473        // ...then extract the Unix Path as a C-String from the FSRef
    8574        unsigned char path[512];