fix: Don't silently drop the change_groups and switch to a couple slightly more efficient implementations (#12431)

This commit is contained in:
Trenton H
2026-03-26 14:15:42 +00:00
committed by GitHub
parent d18bbfa9c3
commit 8efb01010c
2 changed files with 6 additions and 5 deletions
+3 -2
View File
@@ -1,6 +1,7 @@
import datetime
import hashlib
import os
import shutil
import tempfile
from enum import StrEnum
from pathlib import Path
@@ -824,7 +825,7 @@ class ConsumerPlugin(
self.metadata.view_users is not None
or self.metadata.view_groups is not None
or self.metadata.change_users is not None
or self.metadata.change_users is not None
or self.metadata.change_groups is not None
):
permissions = {
"view": {
@@ -857,7 +858,7 @@ class ConsumerPlugin(
Path(source).open("rb") as read_file,
Path(target).open("wb") as write_file,
):
write_file.write(read_file.read())
shutil.copyfileobj(read_file, write_file)
# Attempt to copy file's original stats, but it's ok if we can't
try: