Uploaded image for project: 'Picard'
  1. Picard
  2. PICARD-1988

Aborts if directory scan finds a directory which cannot be read

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 2.4, 2.4.4, 2.5
    • Fix Version/s: 2.5.1
    • Labels:
      None
    • Environment:
      Debian unstable

      Description

      Forwarding a bug report from Debian:

      Picard aborts when it comes across a directory that cannot be read:

      $ picard /storage/music/
      I: 15:52:59,827 /usr/lib/picard/picard/config._backup_settings:274: Backing up config file to /home/ijc/.config/MusicBrainz/Picard-2.4.1.ini
      Traceback (most recent call last):
        File "/usr/lib/picard/picard/tagger.py", line 391, in _run_init
          self.add_directory(decode_filename(file))
        File "/usr/lib/picard/picard/tagger.py", line 574, in add_directory
          files = self._scan_dir([path],
        File "/usr/lib/picard/picard/tagger.py", line 542, in _scan_dir
          for entry in os.scandir(current_folder):
      PermissionError: [Errno 13] Permission denied: '/storage/music/lost+found'
      Aborted
      $ ls -ld /storage/music/lost+found/
      drwx------ 2 root root 16384 Jun 25  2011 /storage/music/lost+found//
      

      This can easily be reproduced with the extreme case of a directory that cannot be read by anyone:

      $ mkdir -p /tmp/picard/test
      $ chmod a-rwx /tmp/picard/test
      $ picard /tmp/picard
      Traceback (most recent call last):
        File "/usr/lib/picard/picard/tagger.py", line 391, in _run_init
          self.add_directory(decode_filename(file))
        File "/usr/lib/picard/picard/tagger.py", line 574, in add_directory
          files = self._scan_dir([path],
        File "/usr/lib/picard/picard/tagger.py", line 542, in _scan_dir
          for entry in os.scandir(current_folder):
      PermissionError: [Errno 13] Permission denied: '/tmp/picard/test'
      

        Attachments

          Activity

            People

            Assignee:
            outsidecontext Philipp Wolfer
            Reporter:
            sebastinas Sebastian Ramacher
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:

                Packages

                Version Package
                2.5.1