Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Case insensitive filename comparisons (Issue #57) #58

Merged
merged 1 commit into from
Aug 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions figshare/Article.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,14 +472,14 @@ def read_version_dirs_fun(self, read_version_dirs, version_dir, version_data):
ual_rdm_path = version_dir + "/" + dir
ual_dir = os.listdir(ual_rdm_path)
for ual_file in ual_dir:
if ("Deposit Agreement" in ual_file
or "Deposit_Agreement" in ual_file):
if ("Deposit Agreement".lower() in ual_file.lower()
or "Deposit_Agreement".lower() in ual_file.lower()):
deposit_agreement_file = True

if ("ReDATA-DepositReview" in ual_file):
if ("ReDATA-DepositReview".lower() in ual_file.lower()):
redata_deposit_review_file = True

if (ual_file.endswith("Trello.pdf")):
if (ual_file.lower().endswith("trello.pdf")):
trello_file = True

version_data["deposit_agreement_file"] = deposit_agreement_file
Expand Down
Loading