From 040464a09c89bceed5213ed5cae9b5c4d93fa237 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=8B=E7=94=B0=E5=BC=98?= <1240092443@qq.com> Date: Mon, 13 Jan 2025 10:29:01 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E8=BF=9C=E7=A8=8B=E4=BB=A3=E7=90=86=E8=B7=AF=E5=BE=84=E4=B8=8D?= =?UTF-8?q?=E5=AD=98=E5=9C=A8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- godo/proxy/frpc.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/godo/proxy/frpc.go b/godo/proxy/frpc.go index 262e640..66bac3c 100644 --- a/godo/proxy/frpc.go +++ b/godo/proxy/frpc.go @@ -246,6 +246,14 @@ func SetFrpcConfig(config FrpConfig) error { log.Printf("Config file not found at %s, creating new file", configPath) } + // 没有就创建 + if !libs.PathExists(filepath.Join(runDir, "frpc")) { + if err := os.MkdirAll(filepath.Join(runDir, "frpc"), 0755); err != nil { + log.Printf("Failed to create frpc directory: %v", err) + return err + } + } + // 打开或创建配置文件 configFile, err := os.Create(configPath) if err != nil {