fix: `from-folder` discarding files as "extension not included"
Fixes #1121
Summary
- Default
immich-go upload from-folderruns were discarding files as "extension not included" becauseSetIncludeTypeExtensions()always seeded the include list with only sidecar extensions. That regression arrived when the CobraPreRunguard was removed in a recent refactor. - The same refactor stopped wiring the parsed filesystem slice and journal recorder into
ImportFolderCmd, so browsing never saw any assets and logging nil-panicked. - Fixes the bugs, add regression tests, and confirm the CLI can scan fixtures again.
Key Changes
-
Extension guard & tests
- Skip
SetIncludeTypeExtensions()work unless--include-typeis set. - Added unit tests in
internal/cliFlags/extensionList_test.gofor both default andVIDEOmodes.
- Skip
-
Folder runner wiring
- Persist the
fshelper.ParsePathresult inImportFolderCmd.fsyssbefore spinning workers. - Ensure the command attaches a
fileevent.Recorderwhenapp.Jnl()is nil, preventing nil-pointer panics while logging.
- Persist the
Verification
- ran
go test ./... - ran
go run . upload from-folder test_folder --no-ui ...now correctly discovers files and no longer drops it as "extension not included" and uploads the files
hey so we need to wait untill merged and new version availale to see it working? (sorry I don't get Git yet)
Related to #1122 as well
I am not that technical a person, I've just been uploading today into a new immich installation and getting a lot of discrded. So I read your explanation above, but I'm not understanding if that actually discarded all these pictures, or it just said it did. Do I have to re-do all my uploadsd? And can I, will there be hash issues? Using immich-go version 0.28.0.
@simulot rebased on develop
Hi, have you checked if the problem isn't already solved on the develop branch?