Skip to content

Commit

Permalink
Add a copystat call in beet's util move, to copy permissions.
Browse files Browse the repository at this point in the history
  • Loading branch information
aereaux committed Mar 8, 2024
1 parent 3548e35 commit 908134d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions beets/util/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,9 @@ def move(path: bytes, dest: bytes, replace: bool = False):
finally:
tmp.close()

# Copy file metadata
shutil.copystat(syspath(path), syspath(dest))

# Move the copied file into place.
try:
os.replace(tmp.name, syspath(dest))
Expand Down

0 comments on commit 908134d

Please sign in to comment.