CLI Upload Case Insensitive Glob Ignore Pattern Not Working As Expected #4733

Closed
opened 2026-02-05 10:49:37 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @rholloway on GitHub (Nov 10, 2024).

Originally assigned to: @etnoy on GitHub.

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

Originally created by @rholloway on GitHub (Nov 10, 2024). Originally assigned to: @etnoy on GitHub. ### 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 ```YAML N/A ``` ### Your .env content ```Shell 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_
Author
Owner

@danieldietzler commented on GitHub (Apr 2, 2025):

If you don't quote the pattern ("**/\@eaDir/**) bash will end up expanding *. This is not a bug with the CLI but rather how it's being used in a bash shell.

@danieldietzler commented on GitHub (Apr 2, 2025): If you don't quote the pattern (`"**/\@eaDir/**`) bash will end up expanding `*`. This is not a bug with the CLI but rather how it's being used in a bash shell.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#4733