Fix the drive letter case check issue for VentoyPlugson in Windows. (#2078)

This commit is contained in:
longpanda 2022-12-20 18:46:04 +08:00
parent cd0c7ca884
commit bf797ceadb
6 changed files with 21 additions and 8 deletions

View file

@ -33,6 +33,8 @@ function ventoy_get_ulen(str) {
function ventoy_common_check_path(path) {
var curdir
if (path.indexOf('//') >= 0) {
return false;
}
@ -41,7 +43,12 @@ function ventoy_common_check_path(path) {
return false;
}
if (path.substr(0, g_current_dir.length) != g_current_dir) {
curdir = path.substr(0, g_current_dir.length);
if (curdir.match("^[a-z]:$")) {
curdir = curdir.toUpperCase();
}
if (curdir != g_current_dir) {
return false;
}