From e489a07553e4bbf1453f5550cc2950e8556de731 Mon Sep 17 00:00:00 2001 From: Ben Date: Sun, 30 Jul 2023 20:05:46 +1000 Subject: [PATCH] improved debug. --- pkg/images/images.go | 2 +- pkg/text/text.go | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/images/images.go b/pkg/images/images.go index 06364c1e..310b9f96 100644 --- a/pkg/images/images.go +++ b/pkg/images/images.go @@ -88,7 +88,7 @@ func Fix(db *sql.DB, w io.Writer) error { c++ fmt.Fprintf(w, "%s%d. %v", str.PrePad, c, img) if _, err := os.Stat(filepath.Join(dir.UUID, img.UUID)); errors.Is(err, fs.ErrNotExist) { - fmt.Fprintf(w, "%s\n", str.X()) + fmt.Fprintf(w, "%s %q\n", str.X(), filepath.Join(dir.UUID, img.UUID)) continue } else if err != nil { return fmt.Errorf("images fix stat: %w", err) diff --git a/pkg/text/text.go b/pkg/text/text.go index e740f52e..2bf3e06e 100644 --- a/pkg/text/text.go +++ b/pkg/text/text.go @@ -71,11 +71,13 @@ func fixRow( if err1 := rows.Scan(&t.ID, &t.UUID, &t.Name, &t.Size, &t.NoReadme, &t.Readme, &t.Platform); err1 != nil { return t, i, c, fmt.Errorf("fix rows scan: %w", err1) } - fmt.Fprintf(w, "\n%s%d. %s", str.PrePad, i, t.String()) ok, err := t.Exist(dir) if err != nil { return t, i, c, fmt.Errorf("fix exist: %w", err) } + if !ok { + fmt.Fprintf(w, "\n%s%d. %s", str.PrePad, i, t.String()) + } // missing images + source is an archive if !ok && t.Archive() { c++