aboutsummaryrefslogtreecommitdiffstats
path: root/src/node.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-06-13 17:11:13 -0400
committerDavid Robillard <d@drobilla.net>2019-12-19 20:55:21 -0500
commit633d058cf776e28bb0ce0505e58b0be348674be4 (patch)
treec75719d5236fbdd032f0242167b5883980ec51e6 /src/node.c
parent6aabd3c6c7ef77009e7b9e5c8b01c3759730dc7a (diff)
downloadserd-633d058cf776e28bb0ce0505e58b0be348674be4.tar.gz
serd-633d058cf776e28bb0ce0505e58b0be348674be4.tar.bz2
serd-633d058cf776e28bb0ce0505e58b0be348674be4.zip
Remove escape parameter from serd_new_file_uri
Since characters are escaped because they are not valid characters in a URI, any use of this function without escaping is problematic at best.
Diffstat (limited to 'src/node.c')
-rw-r--r--src/node.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/node.c b/src/node.c
index 1bdcf5d8..333af9ac 100644
--- a/src/node.c
+++ b/src/node.c
@@ -453,7 +453,7 @@ is_uri_path_char(const char c)
}
SerdNode*
-serd_new_file_uri(const char* path, const char* hostname, bool escape)
+serd_new_file_uri(const char* path, const char* hostname)
{
const size_t path_len = strlen(path);
const size_t hostname_len = hostname ? strlen(hostname) : 0;
@@ -474,7 +474,7 @@ serd_new_file_uri(const char* path, const char* hostname, bool escape)
serd_buffer_sink("/", 1, 1, &buffer);
} else if (path[i] == '%') {
serd_buffer_sink("%%", 1, 2, &buffer);
- } else if (!escape || is_uri_path_char(path[i])) {
+ } else if (is_uri_path_char(path[i])) {
serd_buffer_sink(path + i, 1, 1, &buffer);
} else {
char escape_str[4] = { '%', 0, 0, 0 };