Laharah / deluge-uTorrentImport

cross platform Deluge Plugin for importing torrents from uTorrent
73 stars 13 forks source link

Deluge unable to find correct files when path has trailing slash #12

Open wangqr opened 7 years ago

wangqr commented 7 years ago

To reproduce the bug:

  1. Add a multi-file torrent in uTorrent (e.g. this one). In "Add New Torrent" dialog, add a backslash at the end of the path in the "Save As" textbox (e.g. G:\KNOPPIX_V7.2.0CD-2013-06-16-EN\)
  2. Download part or all of the torrent, so the target folder is not empty
  3. Import the torrent to deluge, now the following line shows up in terminal: [ERROR ] 00:24:12 torrent:1058 Attempting to rename a folder with an invalid folder name:
  4. The imported torrent stays at "Paused 0.00%". Force re-check does not help. Resume the torrent will start downloading files into a subfolder with the same name (i.e. G:\KNOPPIX_V7.2.0CD-2013-06-16-EN\KNOPPIX_V7.2.0CD-2013-06-16-EN\)

Expected behaviour: Deluge recheck the files downloaded by uTorrent and start seeding.

Laharah commented 7 years ago

I'll look into it, I'm not sure why utorrent would allow a trailing slash, but it should be easy enough to scrub it when importing into deluge.

wangqr commented 7 years ago

If user select the root folder of a drive (e.g. G:\) as the target directory, uTorrent will always add a trailing slash. I'm not sure if deluge allows to do so.

Laharah commented 7 years ago

I couldn't replicate this error:

capture1

capture2

The name seems to be missing on the log, but it still imports and begins seeding without trouble. I've tried both with and without the create subfolder checkbox. What version of utorrent and deluge are you using?

wangqr commented 7 years ago

Sorry I forgot to provide the version. I am using uTorrent 2.0.4, which does not have a "Create Subfolder" option. 1

Deluge 1.3.14 with uTorrentImport 2.3.6beta. I was not checking the "Preserve Date Added" and "Resume after Adding" option. 2

I also tried checking those two options, but the only difference is the imported torrent start to download right away. Deluge still download to the subfolder. (see "Progress" in the screenshot) 3

D:\
  KNOPPIX_V7.2.0CD-2013-06-16-EN\
    KNOPPIX_V7.2.0CD-2013-06-16-EN\   <-- Deluge creates this folder and download into it
    dpkg-l-cd-720                            -\
    KNOPPIX_V7.2.0CD-2013-06-16-EN.iso         > These files are created by uTorrent
    KNOPPIX_V7.2.0CD-2013-06-16-EN.iso.md5   -/
    ...