Skip to content

[BUG] Uppercase extensions are skipped and bmp/svg images missing #541

Description

@AwkMan00

Problem description:

Files to be indexed by obsidian are skipped if its extension is in uppercase, as the code only checks for lowercase extensions.
Furthermore, bmp extension is not in the list of supported image extensions (but Text-extractor plugin does support it).
Finally, svg image files are plain text files, so they should be added by default in the option "Addition TEXT files to index".

To fix the uppercase extensions, it is straightforward. In file tools/utils.ts, add .toLowerCase() in all isFile functions (see image below), add .toLowerCase().

Image

Function isFilePlaintext in notes-indexer.ts file also needs .toLowerCase() to be added:

Image

To add bmp extension, it just need to be added in isFileImage function in file tools/utils.ts (see first image).

The svg extension in function getDefaultSettings in file settings/index.ts.

All these changes are straightforward to implement.

Your environment:

  • Omnisearch version: 1.12.7
  • Obsidian version: 1.28.2
  • Operating system: Linux/Windows
  • Number of indexed documents in your vault (approx.): >20K

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions