btpd/btpd — pull request #39 by RecursiveForest (2013-01-19 21:54:41+00:00)
Title: Add default -d = dir of torrent to btcli add

This very minor change makes the -d dir flag optional for `btcli add', defaulting to the directory the torrent is located in, or "." if no directory can be found for the torrent.

Uses dirname() from libgen.h.

I use this in conjunction with -T to emulate the default behaviour of most other torrent clients, such as rtorrent.