gdown
gdown copied to clipboard
All logic relying on `os.path.sep` is wrong on Windows
Provide environment information
Python: 3.8.2 gdown: main
What OS are you using?
Windows 10
Describe the Bug
All the logic using os.path.sep
is incorrect on Windows, because Windows paths treat /
the same as a \
. However, gdown only uses os.path.sep
(which is \
on Windows) meaning that it treats perfectly valid paths incorrectly.
The underlying issue is that gdown assumes that the primary path separator is the only path separator, which is not true.
Example of an incorrect usage of os.path.sep
to detect directory paths.
Expected Behavior
Support paths with both /
and \
on Windows.
To Reproduce
No response
@RunDevelopment I don't own Windows computer so am not able to play around the difference of /
and \
. Can you propose a fix for it as a PR?
As I see it, #313 needs to be fixed before I can propose a fix. You just said that you have no way to verify that any fix I propose works. So there should at least be a test so a Windows CI runner can verify that my fix is correct.
So I'm currently working on #313.