qt: Append usr_path for relative paths in plat_fopen64() on linux as well as macOS

This commit is contained in:
cold-brewed
2022-08-30 19:38:22 -04:00
parent b7aeb806ab
commit 23e587b909

View File

@@ -167,7 +167,7 @@ plat_fopen(const char *path, const char *mode)
FILE *
plat_fopen64(const char *path, const char *mode)
{
#ifdef Q_OS_MACOS
#if defined(Q_OS_MACOS) or defined(Q_OS_LINUX)
QFileInfo fi(path);
QString filename = fi.isRelative() ? usr_path + fi.filePath() : fi.filePath();
return fopen(filename.toUtf8().constData(), mode);