Skip to content

Commit 9bfe0e0

Browse files
rsashankneiljp
authored andcommitted
refactor/bugfix: helper: Normalize file path in process_media.
This removes platform-dependence from download_media, and for now leaves more in process_media, which already had a platform-dependent test. This addresses a failing test in WSL environments in download_media, which is no longer dependent upon the platform.
1 parent 967d762 commit 9bfe0e0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

zulipterminal/helper.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -784,6 +784,7 @@ def process_media(controller: Any, link: str) -> None:
784784
controller.view.set_footer_text, "Downloading your media..."
785785
)
786786
media_path = download_media(controller, link, show_download_status)
787+
media_path = normalized_file_path(media_path)
787788
tool = ""
788789

789790
# TODO: Add support for other platforms as well.
@@ -825,7 +826,7 @@ def download_media(
825826
show_download_status()
826827

827828
controller.report_success([" Downloaded ", ("bold", media_name)])
828-
return normalized_file_path(local_path)
829+
return local_path
829830

830831

831832
@asynch

0 commit comments

Comments
 (0)