fix(xray-update): respect XUI_BIN_FOLDER on Windows

The Windows update path hardcoded "bin/xray-windows-amd64.exe", ignoring
the configured XUI_BIN_FOLDER. In dev mode (folder set to x-ui) this
created a stray bin/ folder while the running binary stayed un-updated.
This commit is contained in:
MHSanaei 2026-05-23 11:45:27 +02:00
parent dcb837f4e1
commit 4f38541ce9
No known key found for this signature in database
GPG key ID: 7E4060F2FBE5AB7A

View file

@ -853,7 +853,7 @@ func (s *ServerService) UpdateXray(version string) error {
// 4. Extract correct binary
if runtime.GOOS == "windows" {
targetBinary := filepath.Join("bin", "xray-windows-amd64.exe")
targetBinary := filepath.Join(config.GetBinFolderPath(), "xray-windows-amd64.exe")
err = copyZipFile("xray.exe", targetBinary)
} else {
err = copyZipFile("xray", xray.GetBinaryPath())