From db077551879bf2fee3cc54f7b25c39c21965c600 Mon Sep 17 00:00:00 2001 From: Andinus Date: Wed, 25 Mar 2020 02:42:00 +0530 Subject: Describe bug in program --- cmd/cetus/bpod.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cmd/cetus/bpod.go b/cmd/cetus/bpod.go index d26e292..d16dc22 100644 --- a/cmd/cetus/bpod.go +++ b/cmd/cetus/bpod.go @@ -104,6 +104,13 @@ func execBPOD() { res.StartDate = dt.Format("2006-01-02") file = fmt.Sprintf("%s/%s.json", cacheDir, res.StartDate) + // Here we are saving the file after unmarshal but causes a + // bug in the program. Random flag was passed so 7 images will + // be retrieved & 7 will get saved in this json file. This + // will cause error when `cetus set bpod -random` is run for + // the first time on specific date & then `cetus set bpod` is + // run, the second command will set random background because + // the first one has downloaded all 7 in the json file. if random { // Write body to the cache so that it can be read // later. -- cgit 1.4.1-2-gfad0