immich icon indicating copy to clipboard operation
immich copied to clipboard

CLI Upload Case Insensitive Glob Ignore Pattern Not Working As Expected

Open rholloway opened this issue 3 months ago • 0 comments

The bug

When using the CLI, the --ignore option seems to have a bug/unexpected output related to case sensitivity. For instance, if I have @eaDir directories in my folders and want to exclude it, the following glob pattern does NOT exclude them and all the nested files are still imported.

immich upload --ignore **/\@eaDir/** --recursive --dry-run Photos/

However, the following command appears to ignore them as expected.

immich upload --ignore **/\@eadir/** --recursive --dry-run Photos/

This may be by design - I see https://github.com/immich-app/immich/blob/main/cli/src/utils.ts#L158 is where it's being done using fast-glob, and it explicitly is set to caseSensitive: false. However, if this means the glob pattern should also be all lowercase, then that should be made more clear in the docs. The current docs imply that you need to match case (for instance, specifically stating how to exclude **/Raw/** files.

The OS that Immich Server is running on

Ubuntu 24

Version of Immich Server

v1.120.0

Version of Immich Mobile App

v1.120.1

Platform with the issue

  • [ ] Server
  • [ ] Web
  • [ ] Mobile

Your docker-compose.yml content

N/A

Your .env content

N/A

Reproduction steps

  1. Create some folders that include directories @eaDir with images inside. Ensure uppercase D and put inside photos/
  2. Run iimich upload --ignore **/\@eaDir/** photos/ and note eadir files are not excluded ...

Relevant log output

No response

Additional information

No response

rholloway avatar Nov 10 '24 12:11 rholloway