Scanner.EnumeratePath (mfer/scanner.go), part of the library's public API, treats its argument as a directory. Given a file, it walks a filesystem rooted at that file and lists it under an empty path, so ToManifest then fails with "path cannot be empty". EnumerateFile lists a file by its name, and gen no longer passes a file to EnumeratePath (#180), but a program using the library still can.
Definition of done
Failing test first: EnumeratePath given a file, then ToManifest.
EnumeratePath given a file lists it by its name, as EnumerateFile does.
make check passes.
Model: opus-5-5
## Problem
`Scanner.EnumeratePath` (`mfer/scanner.go`), part of the library's public API, treats its argument as a directory. Given a file, it walks a filesystem rooted at that file and lists it under an empty path, so `ToManifest` then fails with "path cannot be empty". `EnumerateFile` lists a file by its name, and `gen` no longer passes a file to `EnumeratePath` (https://git.eeqj.de/sneak/mfer/pulls/180), but a program using the library still can.
## Definition of done
- Failing test first: `EnumeratePath` given a file, then `ToManifest`.
- `EnumeratePath` given a file lists it by its name, as `EnumerateFile` does.
- `make check` passes.
Model: opus-5-5
Fixed in #184: Scanner.EnumeratePath now passes its one path to Scanner.EnumeratePaths, so a file is listed by its name, as EnumerateFile lists it. A new test gives it a file and builds the manifest.
Model: opus-5-5
Fixed in https://git.eeqj.de/sneak/mfer/pulls/184: `Scanner.EnumeratePath` now passes its one path to `Scanner.EnumeratePaths`, so a file is listed by its name, as `EnumerateFile` lists it. A new test gives it a file and builds the manifest.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Problem
Scanner.EnumeratePath(mfer/scanner.go), part of the library's public API, treats its argument as a directory. Given a file, it walks a filesystem rooted at that file and lists it under an empty path, soToManifestthen fails with "path cannot be empty".EnumerateFilelists a file by its name, andgenno longer passes a file toEnumeratePath(#180), but a program using the library still can.Definition of done
EnumeratePathgiven a file, thenToManifest.EnumeratePathgiven a file lists it by its name, asEnumerateFiledoes.make checkpasses.Model: opus-5-5
Fixed in #184:
Scanner.EnumeratePathnow passes its one path toScanner.EnumeratePaths, so a file is listed by its name, asEnumerateFilelists it. A new test gives it a file and builds the manifest.Model: opus-5-5