Refactor sync_log_to_install_medium() (#4397)
This commit is contained in:
parent
78987d75fe
commit
6505e17f34
|
|
@ -506,11 +506,9 @@ class Installer:
|
||||||
# at least the base has been strapped in, otherwise we won't have a filesystem/structure to copy to.
|
# at least the base has been strapped in, otherwise we won't have a filesystem/structure to copy to.
|
||||||
if self._helper_flags.get('base-strapped', False) is True:
|
if self._helper_flags.get('base-strapped', False) is True:
|
||||||
absolute_logfile = logger.path
|
absolute_logfile = logger.path
|
||||||
|
logfile_target = self.target / absolute_logfile
|
||||||
if not os.path.isdir(f'{self.target}/{os.path.dirname(absolute_logfile)}'):
|
logfile_target.parent.mkdir(parents=True, exist_ok=True)
|
||||||
os.makedirs(f'{self.target}/{os.path.dirname(absolute_logfile)}')
|
absolute_logfile.copy(logfile_target, preserve_metadata=True)
|
||||||
|
|
||||||
shutil.copy2(absolute_logfile, f'{self.target}/{absolute_logfile}')
|
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue