mirror of
https://github.com/clearlinux/swupd-client.git
synced 2026-09-06 21:51:32 +00:00
target_root: Copy a file instead of tar|tar
When we want to install a single file we can copy it instead of using the tar tar dance. tar_tar is still left as a fallback if copy fails Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
This commit is contained in:
@@ -278,7 +278,13 @@ static enum swupd_code stage_single_file(struct file *file, struct manifest *mom
|
||||
if (!file->is_config && !file->is_state && !file->use_xattrs && !file->is_link) {
|
||||
ret = link(fullfile_path, staged_file);
|
||||
}
|
||||
|
||||
if (ret < 0) {
|
||||
ret = copy(fullfile_path, staged_file);
|
||||
}
|
||||
if (ret < 0) {
|
||||
// If file failed to link or copy
|
||||
UNEXPECTED();
|
||||
ret = install_file_using_tar(fullfile_path, target_path, target_basename);
|
||||
if (ret) {
|
||||
goto out;
|
||||
|
||||
Reference in New Issue
Block a user