fix(native): games on the SD card library start in their own folder

This commit is contained in:
Kurt Himebauch committed 2026-11-09 11:20:39 -05:00
1 parent cb7cfd516e
commit 9c2fa6bf19
2 files changed
+38 -1

No files matched your search

+7 -1
View File
@@ -576,7 +576,12 @@ int fchdir(int fd) {
char *getcwd(char *buf, size_t size) {
static char *(*orig_getcwd)(char *, size_t) = NULL;
if (!orig_getcwd) orig_getcwd = (char *(*)(char *, size_t))dlsym(RTLD_NEXT, "getcwd");
return orig_getcwd ? orig_getcwd(buf, size) : NULL;
char *res = orig_getcwd ? orig_getcwd(buf, size) : NULL;
if (res) {
size_t len = strlen(res);
guest_path_of_mount_source(res, len, buf ? size : len + 1);
}
return res;
}
char *__getcwd_chk(char *buf, size_t size, size_t buflen) {
@@ -621,6 +626,7 @@ char *realpath(const char *path, char *resolved_path) {
}
}
}
if (res) guest_path_of_mount_source(res, strlen(res), resolved_path ? PATH_MAX : strlen(res) + 1);
return res;
}