summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhaedrus Leeds <mwleeds@endlessos.org>2021-03-09 20:37:20 -0800
committerPhaedrus Leeds <mwleeds@endlessos.org>2021-03-09 20:37:20 -0800
commit09c1e7a2bc87a5f9b4035a9c8a0bc0fbc4dfb675 (patch)
treea99d2a36912d19c60de53107176fbe3ac05956d5
parent82f06cc8de06a290a303c5fc1c55996b904491d8 (diff)
downloadostree-fix-file-uri-decoding-first-try.tar.gz
pull: Fix some whitespace and a commentfix-file-uri-decoding-first-try
-rw-r--r--src/libostree/ostree-repo-pull.c35
1 files changed, 18 insertions, 17 deletions
diff --git a/src/libostree/ostree-repo-pull.c b/src/libostree/ostree-repo-pull.c
index 6255bb8c..6ecd793a 100644
--- a/src/libostree/ostree-repo-pull.c
+++ b/src/libostree/ostree-repo-pull.c
@@ -4104,25 +4104,26 @@ ostree_repo_pull_with_options (OstreeRepo *self,
&configured_branches, error))
goto out;
- /* TODO reindent later */
- { OstreeFetcherURI *first_uri = pull_data->meta_mirrorlist->pdata[0];
+ /* Handle file:// URIs */
+ {
+ OstreeFetcherURI *first_uri = pull_data->meta_mirrorlist->pdata[0];
g_autofree char *first_scheme = _ostree_fetcher_uri_get_scheme (first_uri);
- /* NB: we don't support local mirrors in mirrorlists, so if this passes, it
- * means that we're not using mirrorlists (see also fetch_mirrorlist())
- * Also, we explicitly disable the "local repo" path if static deltas
- * were explicitly requested to be required; this is going to happen
- * most often for testing deltas without setting up a HTTP server.
- */
- if (g_str_equal (first_scheme, "file") && !pull_data->require_static_deltas)
- {
- g_autofree char *path = _ostree_fetcher_uri_get_path (first_uri);
- const char *normalized_path = _ostree_fetcher_uri_normalize_file_path (path);
- g_autoptr(GFile) remote_repo_path = g_file_new_for_path (normalized_path);
- pull_data->remote_repo_local = ostree_repo_new (remote_repo_path);
- if (!ostree_repo_open (pull_data->remote_repo_local, cancellable, error))
- goto out;
- }
+ /* NB: we don't support local mirrors in mirrorlists, so if this passes, it
+ * means that we're not using mirrorlists (see also fetch_mirrorlist())
+ * Also, we explicitly disable the "local repo" path if static deltas
+ * were explicitly requested to be required; this is going to happen
+ * most often for testing deltas without setting up a HTTP server.
+ */
+ if (g_str_equal (first_scheme, "file") && !pull_data->require_static_deltas)
+ {
+ g_autofree char *path = _ostree_fetcher_uri_get_path (first_uri);
+ const char *normalized_path = _ostree_fetcher_uri_normalize_file_path (path);
+ g_autoptr(GFile) remote_repo_path = g_file_new_for_path (normalized_path);
+ pull_data->remote_repo_local = ostree_repo_new (remote_repo_path);
+ if (!ostree_repo_open (pull_data->remote_repo_local, cancellable, error))
+ goto out;
+ }
}
/* Change some option defaults if we're actually pulling from a local