Skip to content
This repository has been archived by the owner on Aug 1, 2021. It is now read-only.

Commit

Permalink
should fixed path limit issue with windows ...
Browse files Browse the repository at this point in the history
  • Loading branch information
r0oth3x49 committed Oct 29, 2019
1 parent 07609d9 commit be3f4ea
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions udemy/_shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ def download(self, filepath="", unsafe=False, quiet=False, callback=lambda *x: N
filename = self.filename if not unsafe else self.unsafe_filename

filepath = os.path.join(savedir, filename)
if os.name == "nt" and len(filepath) > 250:
filepath = "\\\\?\\{}".format(filepath)

if self.mediatype == 'external_link':
return self._write_external_links(filepath, unsafe)
Expand Down

0 comments on commit be3f4ea

Please sign in to comment.