Use Path.copy() (#4398)
This commit is contained in:
parent
6505e17f34
commit
1bf87c6f4a
|
|
@ -2,7 +2,6 @@ import os
|
|||
import platform
|
||||
import re
|
||||
import shlex
|
||||
import shutil
|
||||
import subprocess
|
||||
import textwrap
|
||||
import time
|
||||
|
|
@ -1483,7 +1482,7 @@ class Installer:
|
|||
efi_dir_path.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
for file in ('BOOTIA32.EFI', 'BOOTX64.EFI'):
|
||||
shutil.copy(limine_path / file, efi_dir_path)
|
||||
(limine_path / file).copy(efi_dir_path)
|
||||
except Exception as err:
|
||||
raise DiskError(f'Failed to install Limine in {self.target}{efi_partition.mountpoint}: {err}')
|
||||
|
||||
|
|
@ -1532,7 +1531,7 @@ class Installer:
|
|||
|
||||
try:
|
||||
# The `limine-bios.sys` file contains stage 3 code.
|
||||
shutil.copy(limine_path / 'limine-bios.sys', boot_limine_path)
|
||||
(limine_path / 'limine-bios.sys').copy(boot_limine_path)
|
||||
|
||||
# `limine bios-install` deploys the stage 1 and 2 to the
|
||||
self.arch_chroot(f'limine bios-install {parent_dev_path}', peek_output=True)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import re
|
||||
from pathlib import Path
|
||||
from shutil import copy2
|
||||
|
||||
from archinstall.lib.models.packages import Repository
|
||||
from archinstall.lib.pathnames import PACMAN_CONF
|
||||
|
|
@ -52,4 +51,4 @@ class PacmanConfig:
|
|||
|
||||
def persist(self) -> None:
|
||||
if self._repositories and self._config_remote_path:
|
||||
copy2(PACMAN_CONF, self._config_remote_path)
|
||||
PACMAN_CONF.copy(self._config_remote_path, preserve_metadata=True)
|
||||
|
|
|
|||
Loading…
Reference in New Issue