Skip to content

Commit

Permalink
Fixing crash on MacOSX filechooser
Browse files Browse the repository at this point in the history
Closes kivy#524.
  • Loading branch information
Mulugruntz authored Jun 30, 2020
1 parent 11b6b4b commit f12b2f5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions plyer/platforms/macosx/filechooser.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,14 @@ def run(self):
pystr = f.strip().split("*")[-1].split(".")[-1]
filthies.append(objc_str(pystr))
else:
for _ in f[1:]:
for s in f[1:]:
if not self.use_extensions:
if f.strip().endswith("*"):
if s.strip().endswith("*"):
continue
pystr = f.strip().split("*")[-1].split(".")[-1]
pystr = s.strip().split("*")[-1].split(".")[-1]
filthies.append(objc_str(pystr))

ftypes_arr = objc_arr(filthies)
ftypes_arr = objc_arr(*filthies)
panel.setAllowedFileTypes_(ftypes_arr)
panel.setAllowsOtherFileTypes_(not self.use_extensions)

Expand Down

0 comments on commit f12b2f5

Please sign in to comment.