diff --git a/Plugson/src/Core/ventoy_util.h b/Plugson/src/Core/ventoy_util.h index 357dccca..7eadfc0a 100644 --- a/Plugson/src/Core/ventoy_util.h +++ b/Plugson/src/Core/ventoy_util.h @@ -88,6 +88,7 @@ typedef struct SYSINFO char buildtime[128]; int syntax_error; int invalid_config; + int config_save_error; int language; int pathcase; diff --git a/Plugson/src/Web/ventoy_http.c b/Plugson/src/Web/ventoy_http.c index 9907e6da..a84ac426 100644 --- a/Plugson/src/Web/ventoy_http.c +++ b/Plugson/src/Web/ventoy_http.c @@ -325,8 +325,7 @@ static int ventoy_api_sysinfo(struct mg_connection *conn, VTOY_JSON *json) VTOY_JSON_FMT_SINT("invalid_config", g_sysinfo.invalid_config); g_sysinfo.invalid_config = 0; - - + #if defined(_MSC_VER) || defined(WIN32) VTOY_JSON_FMT_STRN("os", "windows"); #else @@ -349,6 +348,8 @@ static int ventoy_api_handshake(struct mg_connection *conn, VTOY_JSON *json) VTOY_JSON_FMT_BEGIN(pos, JSON_BUFFER, JSON_BUF_MAX); VTOY_JSON_FMT_OBJ_BEGIN(); VTOY_JSON_FMT_SINT("status", 0); + VTOY_JSON_FMT_SINT("save_error", g_sysinfo.config_save_error); + g_sysinfo.config_save_error = 0; VTOY_JSON_FMT_OBJ_END(); VTOY_JSON_FMT_END(pos); @@ -3577,6 +3578,7 @@ int ventoy_http_writeback(void) if (ret) { vlog("Failed to write ventoy.json file.\n"); + g_sysinfo.config_save_error = 1; } return 0; diff --git a/Plugson/vs/VentoyPlugson/Release/VentoyPlugson.exe b/Plugson/vs/VentoyPlugson/Release/VentoyPlugson.exe index 5736988a..4f78da81 100644 Binary files a/Plugson/vs/VentoyPlugson/Release/VentoyPlugson.exe and b/Plugson/vs/VentoyPlugson/Release/VentoyPlugson.exe differ diff --git a/Plugson/www/static/js/vtoy.js b/Plugson/www/static/js/vtoy.js index 21f71b43..283bf078 100644 --- a/Plugson/www/static/js/vtoy.js +++ b/Plugson/www/static/js/vtoy.js @@ -480,6 +480,7 @@ var g_vtoy_cur_language_en = "STR_SECURE_BOOT_DISABLE": "Disable", "STR_SYNTAX_ERROR_TIP": "Syntax error detected in ventoy.json, so the configuration is not loaded!", "STR_INVALID_CONFIG_TIP": "Invalid configuration detected in ventoy.json, so the configuration is not loaded!", + "STR_CONFIG_SAVE_ERROR_TIP": "Failed to write ventoy.json file. Check VentoyPlugson.log for more details!", "STR_XXX": "xxx" }; @@ -615,7 +616,7 @@ var g_vtoy_cur_language_cn = "STR_SECURE_BOOT_DISABLE": "未开启", "STR_SYNTAX_ERROR_TIP": "ventoy.json 文件中存在语法错误,配置未加载!", "STR_INVALID_CONFIG_TIP": "ventoy.json 文件中存在错误配置,配置未加载!", - + "STR_CONFIG_SAVE_ERROR_TIP": "ventoy.json 文件写入失败,详细信息请参考 VentoyPlugson.log 文件!", "STR_XXX": "xxx"