macOS: Fix plat_getcwd on .app bundle

This commit is contained in:
richardg867
2022-04-20 13:35:14 -03:00
committed by GitHub
parent 7e9dbffc3b
commit de82cf8bf1

View File

@@ -184,7 +184,12 @@ plat_dir_check(char *path)
int
plat_getcwd(char *bufp, int max)
{
#ifdef __APPLE__
/* Working directory for .app bundles is undefined. */
strncpy(bufp, exe_path, max);
#else
CharPointer(bufp, max) = QDir::currentPath().toUtf8();
#endif
return 0;
}