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

⚡ Fix pep8 violations #678

Merged
merged 2 commits into from
Apr 30, 2022
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
9 changes: 5 additions & 4 deletions plyer/platforms/android/filechooser.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,16 +217,17 @@ def _handle_external_documents(uri):
external_base = basename(internal)

# resolve sdcard path
sdcard = internal
sd_card = internal

# because external might have /storage/.../1 or other suffix
# and file_type might be only a part of the real folder in /storage
if file_type in external_base or external_base in file_type:
sdcard = external
sd_card = external
elif file_type == "home":
sdcard = join(Environment.getExternalStorageDirectory().getAbsolutePath(), Environment.DIRECTORY_DOCUMENTS)
sd_card = join(Environment.getExternalStorageDirectory(
).getAbsolutePath(), Environment.DIRECTORY_DOCUMENTS)

return join(sdcard, file_name)
return join(sd_card, file_name)

@staticmethod
def _handle_media_documents(uri):
Expand Down