majestrate / XD

meme bittorrent client
https://xd-torrent.github.io/
MIT License
238 stars 25 forks source link

Cant add torrents by local file path on windows #104

Closed PotatoSUS closed 11 months ago

PotatoSUS commented 11 months ago

info

160f2917fa85916046c997eccb5858a2e38c592e

OS: Windows

Architecture: X64

problem

When i try to add a torrent by local file path on windows i get the follow error "failed to fetch torrent"

backtrace / error messages

" [NFO] 2023-11-05 21:28:21.0454784 -0300 -03 m=+15.516645601 fetching torrent from c:\Users\re\Downloads\rodrigo.torrent [ERR] 2023-11-05 21:28:21.0462283 -0300 -03 m=+15.517395501 failed to fetch torrent: Get "c:\Users\re\Downloads\rodrigo.torrent": unsupported protocol scheme "c"

r4sas commented 11 months ago

Just not supported.

https://github.com/majestrate/XD/blob/160f2917fa85916046c997eccb5858a2e38c592e/lib/bittorrent/swarm/swarm.go#L331-L332

majestrate commented 11 months ago

would file://c:/whatever/goes/here work?

r4sas commented 11 months ago

would file://c:/whatever/goes/here work?

nope

majestrate commented 11 months ago

try https://github.com/majestrate/XD/commit/baa5f672a964cc8cce6370bdc796179a90e3ba24

r4sas commented 11 months ago

try baa5f67

lib\util\helpers_windows.go:7:2: package os/path is not in std (D:\devel\go1.21.4.windows-amd64\go\src\os\path)

go 1.21.4