#3515: [AutoAdd] - Disables watch on a folder when a torrent file fails 
decoding.
----------------------------+---------------------
 Reporter:  deaddrop9       |       Type:  bug
   Status:  new             |   Priority:  minor
Milestone:  needs verified  |  Component:  Plugin
  Version:  2.0.3           |   Keywords:  AutoAdd
----------------------------+---------------------
 Steps

 Create an invalid torrent file (something this is not bencoded) eg

    echo "Invalid torrent file format" > /path/to/watch-folder/bad.torrent

 Expected outcome

 Torrent file should be detected by AutoAdd, and after failing attempts to
 add a few times, it should be renamed to bad.torrent.invalid (using
 existing file failure functionality) and AutoAdd should continue to
 monitor the folder.


 Actual outcome

 Watch folder is disabled in AutoAdd, and torrent filename is unchanged.
 Re-enabling the folder in AutoAdd, just leads to repeated disables.
 {{{
 deluged[112816]: 21:51:20 [ERROR   ][deluge_autoadd.core           :367 ]
 Disabling "/path/to/watch-folder", error during update: [Failure instance:
 Traceback: <class 'RuntimeError'>: unexpected end of file in bencoded
 string
 deluged[112816]: /usr/lib/python3/dist-
 
packages/deluge/plugins/AutoAdd-1.8.egg/deluge_autoadd/core.py:108:enable_looping
 deluged[112816]: /usr/lib/python3/dist-
 
packages/deluge/plugins/AutoAdd-1.8.egg/deluge_autoadd/core.py:379:enable_watchdir
 deluged[112816]: /usr/local/lib/python3.8/dist-
 packages/twisted/internet/task.py:194:start
 deluged[112816]: /usr/local/lib/python3.8/dist-
 packages/twisted/internet/task.py:239:__call__
 deluged[112816]: --- <exception caught here> ---
 deluged[112816]: /usr/local/lib/python3.8/dist-
 packages/twisted/internet/defer.py:151:maybeDeferred
 deluged[112816]: /usr/lib/python3/dist-
 
packages/deluge/plugins/AutoAdd-1.8.egg/deluge_autoadd/core.py:278:update_watchdir
 deluged[112816]: /usr/lib/python3/dist-
 packages/deluge/plugins/AutoAdd-1.8.egg/deluge_autoadd/core.py:164:load_torrent
 deluged[112816]: ]
 }}}

 Root cause is failure to check data returned from bdecode function. (it
 return None when decoding fails) (pull request to fix coming shortly)

--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3515>
Deluge <https://deluge-torrent.org/>
Deluge Project

-- 
You received this message because you are subscribed to the Google Groups 
"Deluge Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/deluge-dev/048.4f6794d67880a3d30af0fb3654bfd711%40deluge-torrent.org.

Reply via email to