From 0294eed22b181f002c6b1ef75820d6fd030bc35b Mon Sep 17 00:00:00 2001 From: QCDLZCLW3K <1329-33c17f40@users.noreply.dev.s-ul.net> Date: Mon, 23 May 2022 07:53:33 +0900 Subject: [PATCH] Add in check for updates folder too --- src/main/ddrhook1/filesystem.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/main/ddrhook1/filesystem.c b/src/main/ddrhook1/filesystem.c index 98bcebd..83cf3e7 100644 --- a/src/main/ddrhook1/filesystem.c +++ b/src/main/ddrhook1/filesystem.c @@ -129,7 +129,7 @@ static char *ddrhook1_filesystem_get_path(LPCTSTR path) { char *new_path = NULL; - // Hardcoded paths: D:/HDX, E:/conf, E:/conf/nvram, E:/conf/raw + // Hardcoded paths: D:/HDX, E:/conf, E:/conf/nvram, E:/conf/raw, F:/update if (stricmp(path, "D:/HDX") == 0 || stricmp(path, "D:\\HDX") == 0) { ddrhook1_get_launcher_path_parts(&new_path, NULL); @@ -141,6 +141,18 @@ static char *ddrhook1_filesystem_get_path(LPCTSTR path) ddrhook1_get_launcher_path_parts(NULL, &launcher_folder); conf_path = strstr(path, "conf"); + if (conf_path && launcher_folder) { + new_path = (char*)xmalloc(MAX_PATH); + sprintf(new_path, "%s\\%s", launcher_folder, conf_path); + } + } else if (stricmp(path, "F:/update") == 0 + || stricmp(path, "F:\\update") == 0) { + char *launcher_folder; + char *conf_path; + + ddrhook1_get_launcher_path_parts(NULL, &launcher_folder); + conf_path = strstr(path, "update"); + if (conf_path && launcher_folder) { new_path = (char*)xmalloc(MAX_PATH); sprintf(new_path, "%s\\%s", launcher_folder, conf_path);