diff --git a/internal/panupdate/updatefile.go b/internal/panupdate/updatefile.go index ffa88b1..d15a254 100644 --- a/internal/panupdate/updatefile.go +++ b/internal/panupdate/updatefile.go @@ -23,6 +23,10 @@ import ( func update(targetPath string, src io.Reader) error { info, err := os.Stat(targetPath) if err != nil { + if os.IsNotExist(err) { + fmt.Printf("警告: 本地文件不存在 %s\n", targetPath) + return nil + } fmt.Printf("Warning: %s\n", err) return nil }