mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-06-06 05:04:22 +00:00
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:
parent
dcb837f4e1
commit
4f38541ce9
1 changed files with 1 additions and 1 deletions
|
|
@ -853,7 +853,7 @@ func (s *ServerService) UpdateXray(version string) error {
|
||||||
|
|
||||||
// 4. Extract correct binary
|
// 4. Extract correct binary
|
||||||
if runtime.GOOS == "windows" {
|
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)
|
err = copyZipFile("xray.exe", targetBinary)
|
||||||
} else {
|
} else {
|
||||||
err = copyZipFile("xray", xray.GetBinaryPath())
|
err = copyZipFile("xray", xray.GetBinaryPath())
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue