Case sensitive file extension

Open Beginner friendly
#191 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
82/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
zig
Domain
backend

Research direction

The file extension check is in src/io/io.zig around line 189, where the extension is compared case-sensitively. Read the function containing that line to see how the extension is obtained and matched. Make the comparison ignore case, such as by lowercasing the extension before comparing, so uppercase names like .PNG or .JPG are accepted. Done when an uppercase extension loads the same as a lowercase one, which you can confirm with any existing io tests or a quick manual run.

Written by the indexing model from the issue text.

Description

Hi,

in https://github.com/dmtrKovalenko/odiff/blob/6dd1e9629810042c03a81fc787f37b245772970a/src/io/io.zig#L189 the file extension is tested in a case sensitive manner.

However, images often have uppercase extensions too, especially if they come from an old camera.

Comparison should be case-insensitive to handle all usecases.

Dominant language
Zig
Stars
3.3k
Forks
120
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from dmtrKovalenko/odiff

All issues in dmtrKovalenko/odiff

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.