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

Aborts if directory scan finds a directory which cannot be read

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 2.5.1
    • 2.4, 2.4.4, 2.5
    • None
    • Debian unstable

      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'
      

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

              Created:
              Updated:

                Version Package
                2.5.1