From 7acd72c74e2bebb0dd27ce668cd0431fb33d5a38 Mon Sep 17 00:00:00 2001 From: tolelom <98kimsungmin@naver.com> Date: Thu, 26 Mar 2026 15:40:55 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EA=B2=8C=EC=9E=84=20=EC=97=85=EB=8D=B0?= =?UTF-8?q?=EC=9D=B4=ED=8A=B8=20=EA=B0=90=EC=A7=80=EB=A5=BC=20game.zip=20?= =?UTF-8?q?=EC=A0=84=EC=B2=B4=20=ED=95=B4=EC=8B=9C=EB=A1=9C=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A301.exe만 해시하면 Mono 빌드에서 exe가 변경되지 않아 Data 폴더의 스크립트/에셋 변경을 감지하지 못하는 문제 수정. hashGameExeFromZip → hashFileToHex(game.zip 전체)로 변경. Co-Authored-By: Claude Opus 4.6 (1M context) --- internal/download/service.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/download/service.go b/internal/download/service.go index 1ceced9..eecfa7b 100644 --- a/internal/download/service.go +++ b/internal/download/service.go @@ -151,12 +151,12 @@ func (s *Service) Upload(filename string, body io.Reader, baseURL string) (*Info } } - fileHash := hashGameExeFromZip(finalPath) + // game.zip 전체의 해시를 사용하여 업데이트 감지. + // A301.exe만 해시하면 Mono 빌드에서 exe가 안 바뀌어도 + // Data 폴더의 스크립트/에셋 변경을 감지하지 못함. + fileHash := hashFileToHex(finalPath) if fileHash == "" { - if removeErr := os.Remove(finalPath); removeErr != nil { - log.Printf("WARNING: failed to remove file %s: %v", finalPath, removeErr) - } - return nil, fmt.Errorf("zip 파일에 %s이(가) 포함되어 있지 않습니다", "A301.exe") + return nil, fmt.Errorf("파일 해시 계산에 실패했습니다") } info, err := s.repo.GetLatest()