aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/node.c5
-rw-r--r--src/serdi.c2
2 files changed, 3 insertions, 4 deletions
diff --git a/src/node.c b/src/node.c
index 7415ae36..cbb6762b 100644
--- a/src/node.c
+++ b/src/node.c
@@ -179,8 +179,7 @@ is_uri_path_char(const uint8_t c)
SerdNode
serd_node_new_file_uri(const uint8_t* path,
const uint8_t* hostname,
- SerdURI* out,
- bool escape)
+ SerdURI* out)
{
const size_t path_len = strlen((const char*)path);
const size_t hostname_len = hostname ? strlen((const char*)hostname) : 0;
@@ -209,7 +208,7 @@ serd_node_new_file_uri(const uint8_t* path,
serd_buffer_sink("/", 1, &buffer);
} else if (path[i] == '%') {
serd_buffer_sink("%%", 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, &buffer);
} else {
char escape_str[4] = {'%', 0, 0, 0};
diff --git a/src/serdi.c b/src/serdi.c
index a5c3c0da..0619c5fc 100644
--- a/src/serdi.c
+++ b/src/serdi.c
@@ -315,7 +315,7 @@ main(int argc, char** argv)
base =
serd_node_new_uri_from_string((const uint8_t*)argv[a], NULL, &base_uri);
} else if (from_file && in_fd != stdin) { // Use input file URI
- base = serd_node_new_file_uri(input, NULL, &base_uri, true);
+ base = serd_node_new_file_uri(input, NULL, &base_uri);
}
FILE* const out_fd = stdout;