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 c444546d..34de3bfb 100644
--- a/src/node.c
+++ b/src/node.c
@@ -181,8 +181,7 @@ is_uri_path_char(const uint8_t c)
SerdNode
serd_node_new_file_uri(const uint8_t* const path,
const uint8_t* const hostname,
- SerdURI* const out,
- const bool escape)
+ SerdURI* const out)
{
const size_t path_len = strlen((const char*)path);
const size_t hostname_len = hostname ? strlen((const char*)hostname) : 0;
@@ -211,7 +210,7 @@ serd_node_new_file_uri(const uint8_t* const path,
serd_chunk_sink("/", 1, &chunk);
} else if (path[i] == '%') {
serd_chunk_sink("%%", 2, &chunk);
- } else if (!escape || is_uri_path_char(path[i])) {
+ } else if (is_uri_path_char(path[i])) {
serd_chunk_sink(path + i, 1, &chunk);
} else {
char escape_str[4] = {'%', 0, 0, 0};
diff --git a/src/serdi.c b/src/serdi.c
index 06d83816..c594a30a 100644
--- a/src/serdi.c
+++ b/src/serdi.c
@@ -322,7 +322,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;