From f12b2f58acd498f7aa523c57c46ddb115810a72f Mon Sep 17 00:00:00 2001 From: Samuel GIFFARD Date: Tue, 30 Jun 2020 23:59:38 +0900 Subject: [PATCH] Fixing crash on MacOSX filechooser Closes #524. --- plyer/platforms/macosx/filechooser.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plyer/platforms/macosx/filechooser.py b/plyer/platforms/macosx/filechooser.py index e19bceb40..ba4ed646a 100644 --- a/plyer/platforms/macosx/filechooser.py +++ b/plyer/platforms/macosx/filechooser.py @@ -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)