From 928fa937659e06d4d5301ceb38cb68e5ad7629aa Mon Sep 17 00:00:00 2001 From: James Houlahan Date: Fri, 5 Jun 2020 10:48:34 +0200 Subject: [PATCH] fix: don't remove log dir on startup --- Changelog.md | 1 + pkg/config/config.go | 1 + 2 files changed, 2 insertions(+) diff --git a/Changelog.md b/Changelog.md index c589da22..d619efd2 100644 --- a/Changelog.md +++ b/Changelog.md @@ -25,6 +25,7 @@ Changelog [format](http://keepachangelog.com/en/1.0.0/) * Crash when failing to match necessary html element * Crash in message.combineParts when copying nil slice * Handle double charset better by using local ParseMediaType instead of mime.ParseMediaType +* Don't remove log dir ## [v1.2.7] Donghai-hotfix - beta (2020-05-07) diff --git a/pkg/config/config.go b/pkg/config/config.go index 546ffa2d..d0432564 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -110,6 +110,7 @@ func (c *Config) ClearOldData() error { fileName := filepath.Base(filePath) return (fileName != c.cacheVersion && !logFileRgx.MatchString(fileName) && + filePath != c.GetLogDir() && filePath != c.GetTLSCertPath() && filePath != c.GetTLSKeyPath() && filePath != c.GetEventsPath() &&