lib/persistentqueue: use the proper function call after 31945fb38d

This commit is contained in:
Aliaksandr Valialkin 2023-11-02 21:18:00 +01:00
parent dc8bc5d6cd
commit e42af059a1
No known key found for this signature in database
GPG key ID: A72BEC6CD3D0DED1

View file

@ -204,7 +204,11 @@ func tryOpeningQueue(path, name string, chunkFileSize, maxBlockSize, maxPendingB
// path contents is broken or missing. Re-create it from scratch. // path contents is broken or missing. Re-create it from scratch.
fs.MustClose(q.flockF) fs.MustClose(q.flockF)
fs.RemoveDirContents(path) fs.RemoveDirContents(path)
q.flockF = fs.MustCreateFlockFile(path) flockF, err := fs.CreateFlockFile(path)
if err != nil {
logger.Panicf("FATAL: cannot create flock file: %s", err)
}
q.flockF = flockF
mi.Reset() mi.Reset()
mi.Name = q.name mi.Name = q.name
if err := mi.WriteToFile(metainfoPath); err != nil { if err := mi.WriteToFile(metainfoPath); err != nil {