Skip to content

Commit

Permalink
kmlread: make it case insensitive for the suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbarker committed Feb 26, 2025
1 parent 037ca95 commit c2be802
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions MAVProxy/modules/lib/kmlread.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ def readkmz(filename):
filename.strip('"')
#Open the zip file (as applicable)
suffix = pathlib.Path(filename).suffix
if suffix == '.kml':
if suffix.lower() == '.kml':
fo = open(filename, "rb")
fstring = fo.read()
fo.close()
elif suffix == '.kmz':
elif suffix.lower() == '.kmz':
zip=ZipFile(filename)
fstring = None
for z in zip.filelist:
Expand Down

0 comments on commit c2be802

Please sign in to comment.