From 8715c41a47c1e2c423f1d24c9b654572368f18eb Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Fri, 9 Jun 2017 10:02:34 +0300 Subject: [PATCH] (vfs_path_from_str_uri_parser): fix detection of relative path. Signed-off-by: Andrew Borodin --- lib/vfs/path.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/vfs/path.c b/lib/vfs/path.c index eb5fbec1c..0c552b934 100644 --- a/lib/vfs/path.c +++ b/lib/vfs/path.c @@ -436,11 +436,12 @@ vfs_path_from_str_uri_parser (char *path, vfs_path_flag_t flags) { vfs_path_t *vpath; vfs_path_element_t *element; - char *url_delimiter; + (void) flags; + vpath = vfs_path_new (); - vpath->relative = (flags & VPF_NO_CANON) != 0; + vpath->relative = path != NULL && !IS_PATH_SEP (*path); while ((url_delimiter = g_strrstr (path, VFS_PATH_URL_DELIMITER)) != NULL) { -- 2.11.4.GIT