Ticket #1579 (closed defect: worksforme)

Opened 3 years ago

Last modified 3 years ago

Problem setting directory for torrents with spaces in the path

Reported by: Mikko Owned by: rakshasa
Priority: normal Component: libtorrent
Version: HEAD Severity: normal
Keywords: Cc:

Description

In rtorrent.rc I added lines such as:

schedule = watch_directory,3,3,"load=/Mp3/T/Traffic\\ -\\ [1968]\\ Traffic/*.torrent,d.set_directory_base=/Mp3/T/Traffic\\ -\\ [1968]\\ Traffic/"

The torrent loads, but the second command isn't executed. Instead I get this:

Inactive: Command on torrent creation failed: Junk at end of input.

Change History

Changed 3 years ago by Mikko

I think the problem is that "d.set_directory_base" accepts paths with spaces followed by only one backslash, not two. In fact if I manually execute: d.set_directory_base=/Mp3/T/Traffic\\ -\\ [1968]\\ Traffic/ I get the same error. I must execute: d.set_directory_base=/Mp3/T/Traffic\ -\ [1968]\ Traffic/

But if I put: schedule = watch_directory,3,3,"load=/Mp3/T/Traffic\\ -\\ [1968]\\ Traffic/*.torrent,d.set_directory_base=/Mp3/T/Traffic\ -\ [1968]\ Traffic/"

in .rtorrent.rc, rtorrent won't start complaining about "Junk at end of input".

Changed 3 years ago by anonymous

You need to escape the spaces properly:

schedule = watch_directory , 3 , 3 , \
  " load = \"/Mp3/T/Traffic - [1968] Traffic/*.torrent\" , \
      \" d.set_directory_base = \\\"/Mp3/T/Traffic - [1968] Traffic/\\\" \" "

Changed 3 years ago by rakshasa

  • status changed from new to closed
  • resolution set to worksforme
Note: See TracTickets for help on using tickets.