rndusr / stig

TUI and CLI for the BitTorrent client Transmission
GNU General Public License v3.0
556 stars 24 forks source link

`~` not interpreted as home directory when moving torrents #197

Closed gadanidis closed 3 years ago

gadanidis commented 3 years ago

When moving a torrent, you can type ~ to substitute for your home directory, and this is interpreted correctly in the autocomplete (e.g., if I type :mv ~/, the autocomplete shows me the directories in my home directory). However, when executing the command, stig instead interprets the path as relative to the default directory and creates new folders accordingly.

Example: Say the default torrent directory is /home/name/torrents. On executing mv ~/distros:

If it is not possible to support ~ when moving torrents, then I think the autocomplete should not interpret it either, to avoid misleading the user. As a side note, I was surprised that stig automatically created directories without a warning that it was doing so — it's not a problem now that I know how it works, but as default behaviour when moving a torrent I would have expected an error or warning when trying to move to a nonexistent directory.

For reference, I am using the most recent release (0.12.1a0). Thank you for developing this excellent program!

rndusr commented 3 years ago

Thanks for the report. I'll look into it.

I was surprised that stig automatically created directories without a warning that it was doing so

stig doesn't create the directory, it just tells transmission-daemon to move the torrent to that path. What happens next is out of stig's control.

rndusr commented 3 years ago

I've removed the home directory paths from the completion candidates for the move command.