mirror of
https://github.com/ventoy/Ventoy.git
synced 2026-12-05 11:56:51 +01:00
Fix the plugson check for conf replace setting. (#3793)
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user