From 7f737bd925d7ebe0135ad97ac87cb532684e3497 Mon Sep 17 00:00:00 2001 From: W192547975 <138874985+W192547975@users.noreply.github.com> Date: Sat, 30 Dec 2023 16:10:17 +0800 Subject: [PATCH] Update install.go --- core/install.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/install.go b/core/install.go index 5ea0409..21823d4 100644 --- a/core/install.go +++ b/core/install.go @@ -37,7 +37,7 @@ func install() { parseParams("install") targetPath := filepath.Join(defaultInstallPath, defaultBinName) d := daemon{} - binPath, _ := os.Executable() + binPath, _ := os.Executable() // can not use args[0], on Windows call openp2p is ok(=openp2p.exe) if targetPath != binPath { // copy files errFiles := copyFile(targetPath, binPath) @@ -63,7 +63,7 @@ func install() { } func copyFile(dst, src string) error { - srcF, err := os.Open(src) // can not use args[0], on Windows call openp2p is ok(=openp2p.exe) + srcF, err := os.Open(src) if err != nil { return fmt.Errorf("os.Open %s error: %w", src, err) }