diff options
Diffstat (limited to '')
-rwxr-xr-x | mirror-checker.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/mirror-checker.lua b/mirror-checker.lua index 8634e3a..c704bf5 100755 --- a/mirror-checker.lua +++ b/mirror-checker.lua | |||
@@ -486,6 +486,10 @@ if 0 < #arg then | |||
486 | W("slash at end of path! " .. arg[1]) | 486 | W("slash at end of path! " .. arg[1]) |
487 | arg[1] = arg[1]:sub(1, -2) | 487 | arg[1] = arg[1]:sub(1, -2) |
488 | end | 488 | end |
489 | if " " == arg[1]:sub(-1, -1) then | ||
490 | W("space at end of path! " .. arg[1]) | ||
491 | arg[1] = arg[1]:sub(1, -2) | ||
492 | end | ||
489 | local pu = url.parse("http://" .. arg[1]) | 493 | local pu = url.parse("http://" .. arg[1]) |
490 | if nil ~= arg[2] then | 494 | if nil ~= arg[2] then |
491 | logFile, e = io.open("results/mirror-checker-lua_" .. pu.host .. "_" .. arg[2] .. ".log", "a+") | 495 | logFile, e = io.open("results/mirror-checker-lua_" .. pu.host .. "_" .. arg[2] .. ".log", "a+") |
@@ -528,6 +532,10 @@ else | |||
528 | W("slash at end of BaseURL in mirror_list.txt! " .. m.BaseURL) | 532 | W("slash at end of BaseURL in mirror_list.txt! " .. m.BaseURL) |
529 | m.BaseURL = m.BaseURL:sub(1, -2) | 533 | m.BaseURL = m.BaseURL:sub(1, -2) |
530 | end | 534 | end |
535 | if " " == m.BaseURL:sub(-1, -1) then | ||
536 | W("space at end of BaseURL in mirror_list.txt! " .. m.BaseURL) | ||
537 | m.BaseURL = m.BaseURL:sub(1, -2) | ||
538 | end | ||
531 | local pu = url.parse("http://" .. m.BaseURL) | 539 | local pu = url.parse("http://" .. m.BaseURL) |
532 | checkHost(m.BaseURL) | 540 | checkHost(m.BaseURL) |
533 | checkExes("mirror-checker.lua " .. sendArgs) | 541 | checkExes("mirror-checker.lua " .. sendArgs) |