Udayraj123 / OMRChecker

Evaluate OMR sheets fast and accurately using a scanner 🖨 or your phone 🤳.
GNU General Public License v3.0
709 stars 295 forks source link

[Bug] OMR input images are processed twice in windows environment #130

Closed anandSTPS closed 1 year ago

anandSTPS commented 1 year ago

Describe the bug [Bug] OMR input images are processed twice in windows environment. Possibly because windows is case-insensitive.

To Reproduce file to edit src/entry.py (the following edit solves the issue)

import platform

if(platform.system()=="Windows"): exts = (".png", ".jpg", ".jpeg") else: exts = (".png", ".jpg", ".jpeg", ".PNG", ".JPG", "*.JPEG")

Expected behavior OMR input files must be processed only once

Desktop (please complete the following information):

Udayraj123 commented 1 year ago

Hi @anandSTPS, good catch! I might have missed that as macOS filesystem is case-insensitive. Better if we change the condition to be case-insensitive only

anandSTPS commented 1 year ago

Yes, converting all file extension names to lower or uppercase before processing will do just fine.

Udayraj123 commented 1 year ago

@anandSTPS feel free to open a PR for the same then

Udayraj123 commented 1 year ago

Closing as fixed in #132