X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/Ventoy.git/blobdiff_plain/d1584c10b4fbfe23eda94b4fcedc6352990f23f8..7bf85a1ef8e4af080aa30b06a323b101603af5cb:/Plugson/www/static/js/vtoy.js diff --git a/Plugson/www/static/js/vtoy.js b/Plugson/www/static/js/vtoy.js index 283bf07..6871925 100644 --- a/Plugson/www/static/js/vtoy.js +++ b/Plugson/www/static/js/vtoy.js @@ -2,6 +2,13 @@ function ventoy_replace_slash(str) { var str1 = str.replace(/\\/g, '/'); var str2 = str1.replace(/\/\//g, '/'); + + if (str2 && str2.length > 0) { + if (str2.substr(-1) === "/") { + return str2.substr(0, str2.length - 1); + } + } + return str2; }