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>2018-12-31 11:37:47 -0500
commitc10db88a4eac181e83acff319e77308291c59645 (patch)
tree39e065b193665cb5816338d2b360982e036bd365 /src/node.c
parent3a173d711322fac79c019078cd632aa66941b913 (diff)
downloadserd-c10db88a4eac181e83acff319e77308291c59645.tar.gz
serd-c10db88a4eac181e83acff319e77308291c59645.tar.bz2
serd-c10db88a4eac181e83acff319e77308291c59645.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 4b8cdff4..80509640 100644
--- a/src/node.c
+++ b/src/node.c
@@ -389,7 +389,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;
@@ -410,7 +410,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 };