A mount point now counts as a DCF store when its root holds a DCIM or PRIVATE/M4ROOT directory. A bare M4ROOT at the root no longer counts. Asking for a number of stores now returns that many when that many exist. It used to return one too few when asked for two or more.
So that tests can use temporary directories, findDCFMountPoints now only lists the partitions. Two new functions in pkg/dcf/helpers.go do the rest:
filterDCFMountPoints does the counting.
isDCFMountPoint does the check on one mount point.
GetDCFStores is unchanged. The new tests are in pkg/dcf/helpers_internal_test.go, in package dcf.
The README's Design sentence is corrected, and the TODO lines for both bugs are gone. The TODO line about testing now names only the walk of a store, because that part is still untested.
Judgement call: the marker must now be a directory. A plain file named DCIM used to count. The plan asks that the README, the comment and the code agree, and the README says directory.
Model: opus-5-5
Fixes https://git.eeqj.de/sneak/dcf/issues/6.
A mount point now counts as a DCF store when its root holds a `DCIM` or `PRIVATE/M4ROOT` directory. A bare `M4ROOT` at the root no longer counts. Asking for a number of stores now returns that many when that many exist. It used to return one too few when asked for two or more.
So that tests can use temporary directories, `findDCFMountPoints` now only lists the partitions. Two new functions in `pkg/dcf/helpers.go` do the rest:
- `filterDCFMountPoints` does the counting.
- `isDCFMountPoint` does the check on one mount point.
`GetDCFStores` is unchanged. The new tests are in `pkg/dcf/helpers_internal_test.go`, in package `dcf`.
The README's Design sentence is corrected, and the TODO lines for both bugs are gone. The TODO line about testing now names only the walk of a store, because that part is still untested.
Judgement call: the marker must now be a directory. A plain file named `DCIM` used to count. The plan asks that the README, the comment and the code agree, and the README says directory.
Model: opus-5-5
A card was detected only with M4ROOT at its root, and asking for two or
more stores returned one too few. A mount point now counts when its root
holds a DCIM or PRIVATE/M4ROOT directory, and the count is exact.
The check and the counting are split from the partition listing so tests
can hand them temporary directories.
Model: opus-5-5
PASS: #10 does what #6 asks, and requiring the marker to be a directory is the right call.
Model: opus-5-5
PASS: https://git.eeqj.de/sneak/dcf/pulls/10 does what https://git.eeqj.de/sneak/dcf/issues/6 asks, and requiring the marker to be a directory is the right call.
Model: opus-5-5
clawbot
merged commit 445424ba3e into next2026-11-02 21:01:29 +01:00
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.
Fixes #6.
A mount point now counts as a DCF store when its root holds a
DCIMorPRIVATE/M4ROOTdirectory. A bareM4ROOTat the root no longer counts. Asking for a number of stores now returns that many when that many exist. It used to return one too few when asked for two or more.So that tests can use temporary directories,
findDCFMountPointsnow only lists the partitions. Two new functions inpkg/dcf/helpers.godo the rest:filterDCFMountPointsdoes the counting.isDCFMountPointdoes the check on one mount point.GetDCFStoresis unchanged. The new tests are inpkg/dcf/helpers_internal_test.go, in packagedcf.The README's Design sentence is corrected, and the TODO lines for both bugs are gone. The TODO line about testing now names only the walk of a store, because that part is still untested.
Judgement call: the marker must now be a directory. A plain file named
DCIMused to count. The plan asks that the README, the comment and the code agree, and the README says directory.Model: opus-5-5
PASS: #10 does what #6 asks, and requiring the marker to be a directory is the right call.
Model: opus-5-5