From f0be58e8621b094af7ee4e4dacbb4d000bf33acb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Lu=C3=ADs=20Vaz=20Silva?= Date: Sat, 7 Oct 2023 19:54:21 -0300 Subject: [PATCH] hopefully the last few GetChars fixes for linux --- src/common/platform/posix/sdl/i_system.cpp | 2 +- src/common/platform/posix/unix/i_specialpaths.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/common/platform/posix/sdl/i_system.cpp b/src/common/platform/posix/sdl/i_system.cpp index 183d11fc38..58a6a2f379 100644 --- a/src/common/platform/posix/sdl/i_system.cpp +++ b/src/common/platform/posix/sdl/i_system.cpp @@ -337,7 +337,7 @@ int I_PickIWad (WadStuff *wads, int numwads, bool showwin, int defaultiwad, int& cmd.AppendFormat(" --default \"%s (%s)\"", wads[defaultiwad].Name.GetChars(), filepart); } - FILE *f = popen(cmd, "r"); + FILE *f = popen(cmd.GetChars(), "r"); if(f != NULL) { char gotstr[16]; diff --git a/src/common/platform/posix/unix/i_specialpaths.cpp b/src/common/platform/posix/unix/i_specialpaths.cpp index 81cf2ae669..112e92ee79 100644 --- a/src/common/platform/posix/unix/i_specialpaths.cpp +++ b/src/common/platform/posix/unix/i_specialpaths.cpp @@ -74,7 +74,7 @@ FString GetUserFile (const char *file) FString oldpath = NicePath("$HOME/." GAMENAMELOWERCASE "/"); if (stat (oldpath.GetChars(), &extrainfo) != -1) { - if (rename(oldpath.GetChars(), path) == -1) + if (rename(oldpath.GetChars(), path.GetChars()) == -1) { I_Error ("Failed to move old " GAMENAMELOWERCASE " directory (%s) to new location (%s).", oldpath.GetChars(), path.GetChars()); @@ -83,7 +83,7 @@ FString GetUserFile (const char *file) moved = true; } - if (!moved && mkdir (path, S_IRUSR | S_IWUSR | S_IXUSR) == -1) + if (!moved && mkdir (path.GetChars(), S_IRUSR | S_IWUSR | S_IXUSR) == -1) { I_FatalError ("Failed to create %s directory:\n%s", path.GetChars(), strerror (errno)); @@ -231,7 +231,7 @@ FString M_GetDemoPath() FString M_GetNormalizedPath(const char* path) { char *actualpath; - actualpath = realpath(path.GetChars(), NULL); + actualpath = realpath(path, NULL); if (!actualpath) // error ? return nullptr; FString fullpath = actualpath;