diff --git a/tui/torrent.go b/tui/torrent.go index c0f5de8..137504e 100644 --- a/tui/torrent.go +++ b/tui/torrent.go @@ -6,6 +6,7 @@ import ( "net/http" "os" "os/exec" + "path/filepath" "runtime" "strings" "time" @@ -151,7 +152,12 @@ func downloadTorrents(torrents []t.MarkedTorrent, provider string) ([]string, er fileName = v.TorrentCell.Text } - out, err := os.Create(fileName + ".torrent") + var homeDir, hErr = os.UserHomeDir() + if hErr != nil { + log.Fatal(hErr) + } + + out, err := os.Create(filepath.Join(homeDir, "Downloads", fileName) + ".torrent") if err != nil { log.Fatal(err) }