mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2025-07-22 20:41:40 +02:00
Fix bug in fsBackend and add tests for file utils
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2022 NHR@FAU, University Erlangen-Nuremberg.
|
||||
// Copyright (C) 2023 NHR@FAU, University Erlangen-Nuremberg.
|
||||
// All rights reserved.
|
||||
// Use of this source code is governed by a MIT-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
@@ -348,7 +348,7 @@ func (fsa *FsArchive) Compress(jobs []*schema.Job) {
|
||||
|
||||
for _, job := range jobs {
|
||||
fileIn := getPath(job, fsa.path, "data.json")
|
||||
if !util.CheckFileExists(fileIn) && util.GetFilesize(fileIn) > 2000 {
|
||||
if util.CheckFileExists(fileIn) && util.GetFilesize(fileIn) > 2000 {
|
||||
util.CompressFile(fileIn, getPath(job, fsa.path, "data.json.gz"))
|
||||
cnt++
|
||||
}
|
||||
|
Reference in New Issue
Block a user