Fix bug in compression service

This commit is contained in:
Jan Eitzinger 2023-06-14 07:31:43 +02:00
parent 9bdd608361
commit 93396aa0ea

View File

@ -363,6 +363,7 @@ func (fsa *FsArchive) CompressLast(starttime int64) int64 {
b, err := os.ReadFile(filename)
if err != nil {
log.Errorf("fsBackend Compress - %v", err)
os.WriteFile(filename, []byte(fmt.Sprintf("%d", starttime)), 0644)
return starttime
}
last, err := strconv.ParseInt(strings.TrimSuffix(string(b), "\n"), 10, 64)