r0oth3x49 / acloud-dl

A cross-platform python based utility to download courses from acloud.guru for personal offline use.
MIT License
350 stars 141 forks source link

Long filenames (and presumably paths) are an issue in Windows #34

Closed freddy2659 closed 4 years ago

freddy2659 commented 4 years ago

I have a fix but you might want to implement your own. https://github.com/jonohein/acloud-dl/commit/4170082c88bd80b2301a6ba9d097ff82a8bb4613

For and issue file, see 'AWS Certified Advanced Networking - Specialty 2020\03 Configure Network Integration with Application Services\013 Maintaining Transport Layer Security All the Way to Your Container Using the Network Load Balanc....txt'

It gives a file not found error when using 'with open' in _shared.py

freddy2659 commented 4 years ago

I've put a PR for my fix: https://github.com/r0oth3x49/acloud-dl/pull/35

r0oth3x49 commented 4 years ago

@jonohein thanks for the PR but adding only these two lines would have done the work i guess.

if os.name == "nt" and len(filepath) > 250:
    filepath = "\\\\?\\{}".format(filepath)
r0oth3x49 commented 4 years ago

@jonohein nice one to use the range import, thanks for that.