@cryptotaxi247 / kubo / commits / 78ef5e9ee

wrap user-facing mfs.Lookup error (#10821)

To avoid the blank Error: file does not exist and specify which file we failed to find. Error before: `Error: file does not exist` Error after: `Error: /my-cat-pic.jpg: file does not exist` Closes #8671

Andrew Gillis committed Jun 2, 2025 at 16:12 UTC 78ef5e9eebb83daa8b6a55e867b10ab41d2d8851
1 file changed +1 -1
core/commands/files.go
+1 -1
@@ -724,7 +724,7 @@ Examples:
724
725 fsn, err := mfs.Lookup(nd.FilesRoot, path)
726 if err != nil {
727 - return err
727 + return fmt.Errorf("%s: %w", path, err)
728 }
729
730 fi, ok := fsn.(*mfs.File)