file ext ignore case

This commit is contained in:
Meo597
2026-10-26 21:52:06 +08:00
parent 75c08917e3
commit 816f1d6123
3 changed files with 14 additions and 3 deletions
+2 -1
View File
@@ -3,6 +3,7 @@ package lua
import (
"os"
"path/filepath"
"strings"
xlua "github.com/xtls/xray-core/common/lua"
"github.com/xtls/xray-core/main/commands/base"
@@ -32,7 +33,7 @@ func executeSign(cmd *base.Command, args []string) {
cmd.Usage()
}
if filepath.Ext(args[0]) != ".lua" {
if !strings.EqualFold(filepath.Ext(args[0]), ".lua") {
base.Fatalf("Lua file extension must be .lua")
}
info, err := os.Stat(args[0])