89,97c89,96 < char parentdir[MAXPATHLEN]; < CFURLRef url = CFBundleCopyBundleURL(CFBundleGetMainBundle()); < CFURLRef url2 = CFURLCreateCopyDeletingLastPathComponent(0, url); < if (CFURLGetFileSystemRepresentation(url2, 1, (UInt8 *)parentdir, MAXPATHLEN)) { < chdir(parentdir); /* chdir to the binary app's parent */ < } < CFRelease(url); < CFRelease(url2); < } --- > char workingdir[MAXPATHLEN]; > CFURLRef url = CFBundleCopyResourcesDirectoryURL(CFBundleGetMainBundle()); > if (CFURLGetFileSystemRepresentation(url, true, (UInt8 *)workingdir, MAXPATHLEN)) { > chdir(workingdir); /* chdir to Resources */ > } > CFRelease(url); > } >