[ostree] repo: Delete a remote's keyring when deleting a remote



commit 0c92d7a8d05cdb55964a95a6b7703a7d220a39f8
Author: Matthew Barnes <mbarnes redhat com>
Date:   Fri May 1 10:06:24 2015 -0400

    repo: Delete a remote's keyring when deleting a remote

 src/libostree/ostree-repo.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/libostree/ostree-repo.c b/src/libostree/ostree-repo.c
index da671c6..d267ae9 100644
--- a/src/libostree/ostree-repo.c
+++ b/src/libostree/ostree-repo.c
@@ -915,6 +915,10 @@ impl_repo_remote_delete (OstreeRepo     *self,
         }
     }
 
+  /* Delete the remote's keyring file, if it exists. */
+  if (!ot_ensure_unlinked_at (self->repo_dir_fd, remote->keyring, error))
+    goto out;
+
   ost_repo_remove_remote (self, remote);
 
   ret = TRUE;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]