From 6a16866f4e0908e62c5e5b30e3dc0ef8e4cb0819 Mon Sep 17 00:00:00 2001 From: Unknown Date: Sun, 6 Apr 2014 13:41:58 -0400 Subject: Fix bug related to log --- update.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'update.go') diff --git a/update.go b/update.go index aae2e71048..79ce8f524d 100644 --- a/update.go +++ b/update.go @@ -32,7 +32,8 @@ gogs serv provide access auth for repositories`, func newUpdateLogger(execDir string) { logPath := execDir + "/log/update.log" os.MkdirAll(path.Dir(logPath), os.ModePerm) - f, err := os.Open(logPath) + + f, err := os.OpenFile(logPath, os.O_WRONLY|os.O_APPEND|os.O_CREATE, os.ModePerm) if err != nil { qlog.Fatal(err) } -- cgit v1.2.3