From acace571efb0fe6410e6464e715d1f50f832a9a7 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Fri, 30 Jun 2017 00:43:31 +0100 Subject: [PATCH] lib/repo: Fix repo-finder deleting remote configs when run MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit An inverted condition in _ostree_repo_add_remote() was causing the OstreeRepoFinder to delete precisely the wrong remote configurations from memory once it was finished. It’s supposed to delete the ones which it transiently added; but was instead deleting all the existing remote configurations. Signed-off-by: Philip Withnall Closes: #985 Approved by: cgwalters --- src/libostree/ostree-repo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libostree/ostree-repo.c b/src/libostree/ostree-repo.c index 8f3a8bd0..a02214e1 100644 --- a/src/libostree/ostree-repo.c +++ b/src/libostree/ostree-repo.c @@ -181,7 +181,7 @@ _ostree_repo_add_remote (OstreeRepo *self, g_mutex_lock (&self->remotes_lock); - already_existed = g_hash_table_replace (self->remotes, remote->name, ostree_remote_ref (remote)); + already_existed = !g_hash_table_replace (self->remotes, remote->name, ostree_remote_ref (remote)); g_mutex_unlock (&self->remotes_lock);