From 34af24bbf7a8f7ad7b9c084bb7144c75832e853f Mon Sep 17 00:00:00 2001 From: Aidan Epstein Date: Thu, 19 Dec 2024 16:43:41 -0800 Subject: [PATCH] Add some error ignoring for copystat call in move() --- beets/util/__init__.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/beets/util/__init__.py b/beets/util/__init__.py index 0061d3ba03..83f4443da6 100644 --- a/beets/util/__init__.py +++ b/beets/util/__init__.py @@ -533,8 +533,13 @@ def move(path: bytes, dest: bytes, replace: bool = False): finally: tmp.close() - # Copy file metadata - shutil.copystat(syspath(path), tmp.name) + try: + # Copy file metadata + shutil.copystat(syspath(path), tmp.name) + except OSError: + # Ignore errors because it doesn't matter too much. We may be on a + # filesystem that doesn't support this. + pass # Move the copied file into place. try: