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

Move additional files fails if multiple patterns match

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 2.0.4
    • Fix Version/s: 2.1.0dev2
    • Component/s: File Move & Rename
    • Labels:
      None

      Description

      If there are multiple patterns defined in "move additional files" that will match the same file, saving will fail. The reason is that the first pattern already moves the file, and the second pattern tries to move the same file again.

      Traceback (most recent call last):
      File "/home/phw/devel/musicbrainz/picard/picard/util/thread.py", line 52, in run
      result = self.func()
      File "/home/phw/devel/musicbrainz/picard/picard/file.py", line 231, in _save_and_rename
      self._move_additional_files(old_filename, new_filename)
      File "/home/phw/devel/musicbrainz/picard/picard/file.py", line 452, in _move_additional_files
      shutil.move(old_file, new_file)
      File "/usr/lib/python3.7/shutil.py", line 571, in move
      copy_function(src, real_dst)
      File "/usr/lib/python3.7/shutil.py", line 257, in copy2
      copyfile(src, dst, follow_symlinks=follow_symlinks)
      File "/usr/lib/python3.7/shutil.py", line 120, in copyfile
      with open(src, 'rb') as fsrc:
      FileNotFoundError: [Errno 2] No such file or directory: '/home/phw/Musik/Tagged/lossless/P/Parasite Inc_/Dead and Alive_org (Kopie)/Dead and Alive.pdf'

        Attachments

          Activity

            People

            • Assignee:
              outsidecontext Philipp Wolfer
              Reporter:
              outsidecontext Philipp Wolfer
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: