From 365f2a130f402c48cddea3f313b3a6cad1967000 Mon Sep 17 00:00:00 2001 From: Florin Apostol Date: Sat, 24 Oct 2015 16:52:44 +0100 Subject: [PATCH] uri: fix behaviour for merging uris ending in .. without following / https://bugzilla.gnome.org/show_bug.cgi?id=757065 --- gst/gsturi.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gst/gsturi.c b/gst/gsturi.c index 3efaae3418..52f951b8b6 100644 --- a/gst/gsturi.c +++ b/gst/gsturi.c @@ -1238,7 +1238,12 @@ _remove_dot_segments (GList * path) out = g_list_delete_link (out, prev); } g_free (elem->data); - out = g_list_delete_link (out, elem); + if (next != NULL) { + out = g_list_delete_link (out, elem); + } else { + /* path ends in '/..' We need to keep the last '/' */ + elem->data = NULL; + } } }