Skip to content

Commit

Permalink
Merge pull request #16 from nic0lette/fix-filename-check
Browse files Browse the repository at this point in the history
Don't require lowercase name
  • Loading branch information
nic0lette authored Jun 3, 2019
2 parents a1c1965 + d1c3e36 commit b0b7011
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion flask-app.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def randomize():
rom = randomize_rom(rom, flags, rom_seed)

filename = uploaded_rom.filename
index = filename.rfind(".gba")
index = filename.lower().rfind(".gba")
if index < 0:
return f"Bad filename: {filename}"
filename = get_filename(filename, flags, rom_seed)
Expand Down
2 changes: 1 addition & 1 deletion randomize.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def get_filename(base_path: str, flags: Flags, rom_seed: str) -> str:
filename = base_path
if filename.find(os.sep) > -1:
filename = filename[0:filename.rfind(os.sep)]
if filename.endswith(".gba"):
if filename.lower().endswith(".gba"):
filename = filename[:len(filename) - 4]
return f"{filename}_{flags.text()}_{rom_seed}.gba"

Expand Down

0 comments on commit b0b7011

Please sign in to comment.