import/pull-tar: fix flag set

There is a typo passing flags to `install_file()`, if `IMPORT_READ_ONLY` is set,
`IMPORT_SYNC` is never checked.
This commit is contained in:
Antonio Alvarez Feijoo
2025-02-26 11:14:17 +01:00
committed by Luca Boccassi
parent 2006e341d3
commit 5d2d0c055b

View File

@@ -423,7 +423,7 @@ static void tar_pull_job_on_finished(PullJob *j) {
r = install_file(
AT_FDCWD, i->local,
AT_FDCWD, NULL,
(i->flags & IMPORT_READ_ONLY) ? INSTALL_READ_ONLY : 0 |
(i->flags & IMPORT_READ_ONLY ? INSTALL_READ_ONLY : 0) |
(i->flags & IMPORT_SYNC ? INSTALL_SYNCFS : 0));
if (r < 0) {
log_error_errno(r, "Failed to finalize '%s': %m", i->local);