Skip to content

archives plugin crashes when encountering a directory #1525

@ianstalk

Description

@ianstalk

Expected behaviour:

Plugin should correctly reject directories

Actual behaviour:

Crash!

Steps to reproduce:

  • Pass a directory entry to the archive plugin

Config:

paste relevant config
use paste service if config is too long

Log:

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/flexget/task.py", line 477, in __run_plugin
    return method(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/flexget/event.py", line 23, in __call__
    return self.func(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/flexget/plugins/filter/archives.py", line 65, in on_task_filter
    if archive.is_archive(archive_path):
  File "/usr/local/lib/python2.7/site-packages/flexget/utils/archive.py", line 207, in is_archive
    archive = open_archive(path)
  File "/usr/local/lib/python2.7/site-packages/flexget/utils/archive.py", line 189, in open_archive
    elif rarfile and rarfile.is_rarfile(archive_path):
  File "/usr/local/lib/python2.7/site-packages/rarfile.py", line 362, in is_rarfile
    fd = XFile(xfile)
  File "/usr/local/lib/python2.7/site-packages/rarfile.py", line 1755, in __init__
    self._fd = open(xfile, 'rb', bufsize)
IOError: [Errno 21] Is a directory: u'/Volumes/Drobo/downloads/tv/

Additional information:

  • Flexget Version: 2.6.1
  • Python Version: 2.7.12
  • Installation method: pip
  • OS and version: OS X Snow Leopard
  • Link to crash log:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions