Skip to content

Commit

Permalink
escape characters like ':' that may cause problems under Windows when
Browse files Browse the repository at this point in the history
building file names
  • Loading branch information
yiwenlu66 committed Jan 26, 2017
1 parent 6359d57 commit 7ab5045
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions edx_dl/edx_dl.py
Original file line number Diff line number Diff line change
Expand Up @@ -779,6 +779,8 @@ def _build_filename_from_url(url, target_dir, filename_prefix, is_video=False,
original_filename = 'video_%05d.mp4' % video_counter[0]
else:
original_filename = url.rsplit('/', 1)[1]
# escape characters like ':' that may cause problems under Windows
original_filename = quote(original_filename)
filename = os.path.join(target_dir,
filename_prefix + '-' + original_filename)

Expand Down

0 comments on commit 7ab5045

Please sign in to comment.