From: Philip Withnall Date: Tue, 3 Oct 2017 14:45:34 +0000 (+0100) Subject: lib/repo-commit: Import detached metadata even if hardlink exists X-Git-Tag: archive/raspbian/2022.1-3+rpi1~1^2~4^2~30^2~88 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=86e072bdbe48a4f16efb05c00eb79114e5fdbf61;p=ostree.git lib/repo-commit: Import detached metadata even if hardlink exists Spotted while reading through the code, it looks like the copy_detached_metadata() call is accidentally omitted if a hardlink already exists for the .commit object. Signed-off-by: Philip Withnall Closes: #1242 Approved by: cgwalters --- diff --git a/src/libostree/ostree-repo-commit.c b/src/libostree/ostree-repo-commit.c index 0bf4078b..0060120f 100644 --- a/src/libostree/ostree-repo-commit.c +++ b/src/libostree/ostree-repo-commit.c @@ -3319,7 +3319,7 @@ import_one_object_direct (OstreeRepo *dest_repo, if (linkat (src_repo->objects_dir_fd, loose_path_buf, dest_dfd, loose_path_buf, 0) != 0) { if (errno == EEXIST) - return TRUE; + did_hardlink = TRUE; else if (errno == EMLINK || errno == EXDEV || errno == EPERM) { /* EMLINK, EXDEV and EPERM shouldn't be fatal; we just can't do