Error logging.

This commit is contained in:
Nuno Cruces
2023-12-27 14:06:44 +00:00
parent e944d5d8e7
commit d56ee4ac2c
9 changed files with 80 additions and 14 deletions

View File

@@ -53,18 +53,18 @@ func (d fsdir) Open() (sqlite3.VTabCursor, error) {
type cursor struct {
fsys fs.FS
base string
rowID int64
eof bool
curr entry
next chan entry
done chan struct{}
base string
rowID int64
eof bool
}
type entry struct {
path string
fs.DirEntry
err error
err error
path string
}
func (c *cursor) Close() error {
@@ -180,7 +180,7 @@ func (c *cursor) WalkDirFunc(path string, d fs.DirEntry, err error) error {
select {
case <-c.done:
return fs.SkipAll
case c.next <- entry{path, d, err}:
case c.next <- entry{d, err, path}:
return nil
}
}