Fix the plugson check for conf replace setting. (#3793)

This commit is contained in:
longpanda
2026-12-04 19:10:35 +08:00
parent 9d64f850a7
commit 42b79b3319
3 changed files with 21 additions and 12 deletions
+14 -5
View File
@@ -155,6 +155,20 @@
m_conf_iso_path = ventoy_replace_slash(m_conf_iso_path);
m_conf_new_path = ventoy_replace_slash(m_conf_new_path);
const path = m_conf_iso_path.substr(g_current_dir.length);
const alldata = m_data_conf_replace[current_tab_index];
let count = 0;
for (let i = 0; i < alldata.length; i++) {
if (alldata[i].path === path) {
count++;
}
}
if (count >= 2) {
Message.error(g_vtoy_cur_language.STR_CONF_REPLACE_MAX_ENTRY);
return;
}
if (!ventoy_common_check_path(m_conf_iso_path)) {
Message.error(g_vtoy_cur_language.STR_INVALID_FILE_PATH);
return;
@@ -214,11 +228,6 @@
});
$("#id_conf_replace_tbl").on('click', '.ConfReplaceAddBtn', function() {
if (m_data_conf_replace[current_tab_index].length >= 2) {
Message.error(g_vtoy_cur_language.STR_CONF_REPLACE_MAX_ENTRY);
return;
}
if (g_current_language === 'en') {
$('#ConfReplaceForm #ConfReplaceForm_lang_1').text("ISO Path");
$('#ConfReplaceForm #ConfReplaceForm_lang_2').text(" OK");