file_util: Make sure portable user path is absolute. (#7448)

This commit is contained in:
Steveice10
2024-02-18 15:21:53 -08:00
committed by GitHub
parent cbe8987036
commit 3a4ebb1413
4 changed files with 41 additions and 34 deletions

View File

@@ -3197,8 +3197,10 @@ int main(int argc, char* argv[]) {
QApplication::setHighDpiScaleFactorRoundingPolicy(rounding_policy);
#ifdef __APPLE__
std::string bin_path = FileUtil::GetBundleDirectory() + DIR_SEP + "..";
chdir(bin_path.c_str());
auto bundle_dir = FileUtil::GetBundleDirectory();
if (bundle_dir) {
FileUtil::SetCurrentDir(bundle_dir.value() + "..");
}
#endif
#ifdef ENABLE_OPENGL