You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think this will fail on Windows. And if I set the Path with slash it will add two slash. Most Linux don't break because of this, but the correct way is to use path.Join function to concat paths.
If there's no specific reason for this I can send a PR to fix it.
The text was updated successfully, but these errors were encountered:
This problem is not a big as you think. Windows is smart enough to also recognize / as a path delimiter and is capable of handling multiple slashes repeatedly in it. Later one also applies for Unix system, I believe. To prove this, we actually test tusd on Windows and the results are usually green, e.g. https://ci.appveyor.com/project/Acconut/tusd/build/1.0.293.
However, there is no specific reason and it would be great if you could send a PR for this. Please also remember to update the corresponding tests as they might break by this change.
In the lines above the path is concatenated with
/
.https://github.com/tus/tusd/blob/master/filestore/filestore.go#L187
https://github.com/tus/tusd/blob/master/filestore/filestore.go#L192
I think this will fail on Windows. And if I set the Path with slash it will add two slash. Most Linux don't break because of this, but the correct way is to use
path.Join
function to concat paths.If there's no specific reason for this I can send a PR to fix it.
The text was updated successfully, but these errors were encountered: