Skip to content

Commit 9676902

Browse files
committed
[#76509] linux-client: Add warning when FileStore is created with non-FileStore files
Signed-off-by: Łukasz Kędziora <lkedziora@antmicro.com>
1 parent 41947e2 commit 9676902

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

devices/linux-client/actions/file_store.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@ import (
55
"errors"
66
"io/ioutil"
77
"os"
8+
"path"
89
"path/filepath"
910
"strconv"
1011
"sync"
1112

13+
log "github.com/sirupsen/logrus"
1214
"golang.org/x/sync/semaphore"
1315
)
1416

@@ -136,6 +138,8 @@ func (q *FileStore) Reload() error {
136138
var item FileBlob
137139
idx, err := q.idxFromPath(file.Name())
138140
if err != nil {
141+
log.Warnln("Unparsable file found in FileStore directory:", path.Join(q.rootDir, file.Name()))
142+
log.Warnln("FileStore may be pointing to a directory containing files not created by it, this is not allowed.")
139143
continue
140144
}
141145

0 commit comments

Comments
 (0)