summaryrefslogtreecommitdiff
path: root/src/import/pull-tar.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/import/pull-tar.c')
-rw-r--r--src/import/pull-tar.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/import/pull-tar.c b/src/import/pull-tar.c
index 16994e1c24..58cafdd789 100644
--- a/src/import/pull-tar.c
+++ b/src/import/pull-tar.c
@@ -281,8 +281,9 @@ static void tar_pull_job_on_finished(PullJob *j) {
if (r < 0)
goto finish;
- if (renameat2(AT_FDCWD, i->temp_path, AT_FDCWD, i->final_path, RENAME_NOREPLACE) < 0) {
- r = log_error_errno(errno, "Failed to rename to final image name: %m");
+ r = rename_noreplace(AT_FDCWD, i->temp_path, AT_FDCWD, i->final_path);
+ if (r < 0) {
+ log_error_errno(r, "Failed to rename to final image name: %m");
goto finish;
}