From caf94ec6ed6280b53c880e921de0cf770375cf1a Mon Sep 17 00:00:00 2001 From: qydysky Date: Mon, 17 Apr 2023 02:50:45 +0800 Subject: [PATCH] =?utf8?q?Fix=20=E6=9F=90=E4=BA=9B=E6=83=85=E5=86=B5?= =?utf8?q?=E4=B8=8BCookie=E5=AD=98=E5=82=A8=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- F/CookieCrypo.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/F/CookieCrypo.go b/F/CookieCrypo.go index 70fba38..9587342 100644 --- a/F/CookieCrypo.go +++ b/F/CookieCrypo.go @@ -71,7 +71,9 @@ func CookieSet(source []byte) { pub = d } } else { - file.New(`cookie.txt`, 0, true).Write(append([]byte("nol"), source...), true) + f := file.New(`cookie.txt`, 0, true) + f.Delete() + f.Write(append([]byte("nol"), source...), true) return } } @@ -79,6 +81,8 @@ func CookieSet(source []byte) { clog.L(`E: `, e) return } else { - file.New(`cookie.txt`, 0, true).Write(append([]byte("pem"), source...), true) + f := file.New(`cookie.txt`, 0, true) + f.Delete() + f.Write(append([]byte("pem"), source...), true) } } -- 2.39.2