I was noticing, in wormhole-gui, that sending directories on Windows always failed with an error. After some debugging, it turns out that filepath.Walk calls the path with "\", but if the given path contains forward slashes, calling filepath.TrimPrefix will fail. You might say that this PR makes it possible to use “/“ when used on Windows and is thus perhaps more of a feature than a bug fix. If you don’t want to add this, I won’t complain.
It also features a minor cleanup inside the filepath.Walk function. I figured that I would open a PR upstream as the same issue can be found in the command line utility. Merry Christmas :christmas_tree:
This is honestly a bad solution to something that is almost a non issue. A Linux user like me can just press tab and have powershell auto complete the correct backslash path.
I was noticing, in wormhole-gui, that sending directories on Windows always failed with an error. After some debugging, it turns out that filepath.Walk calls the path with "\", but if the given path contains forward slashes, calling
filepath.TrimPrefix
will fail. You might say that this PR makes it possible to use “/“ when used on Windows and is thus perhaps more of a feature than a bug fix. If you don’t want to add this, I won’t complain.It also features a minor cleanup inside the
filepath.Walk
function. I figured that I would open a PR upstream as the same issue can be found in the command line utility. Merry Christmas :christmas_tree: