lib/repo: Fix repo-finder deleting remote configs when run

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 <withnall@endlessm.com>

Closes: #985
Approved by: cgwalters
This commit is contained in:
Philip Withnall 2017-06-30 00:43:31 +01:00 committed by Atomic Bot
parent aa26db825f
commit acace571ef

View File

@ -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);