mirror of
https://github.com/ventoy/Ventoy.git
synced 2025-05-25 12:34:32 -04:00
Fix the drive letter case check issue for VentoyPlugson in Windows. (#2078)
This commit is contained in:
parent
cd0c7ca884
commit
bf797ceadb
6 changed files with 21 additions and 8 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue