diff options
author | Ondrej Holy <oholy@redhat.com> | 2014-07-03 11:29:13 +0200 |
---|---|---|
committer | Ondrej Holy <oholy@redhat.com> | 2014-07-10 13:51:05 +0200 |
commit | 1e460863f255ad48895424d87adc5381098661f7 (patch) | |
tree | 96039c96582ce1b7ab126d6e70a545048e81ca9e | |
parent | 26b03564d1797676392294e291d96173ff60e404 (diff) | |
download | gvfs-1e460863f255ad48895424d87adc5381098661f7.tar.gz |
dav: don't set NULL path to avoid warnings
Path is always non-NULL. Set a path to "/" instead of NULL.
https://bugzilla.gnome.org/show_bug.cgi?id=732090
-rw-r--r-- | daemon/gvfsbackenddav.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/daemon/gvfsbackenddav.c b/daemon/gvfsbackenddav.c index ae9e6ebe..d88e4fc8 100644 --- a/daemon/gvfsbackenddav.c +++ b/daemon/gvfsbackenddav.c @@ -166,12 +166,12 @@ path_get_parent_dir (const char *path) len--; if (len == 0) - return NULL; + return g_strdup ("/"); parent = g_strrstr_len (path, len, "/"); if (parent == NULL) - return NULL; + return g_strdup ("/"); return g_strndup (path, (parent - path) + 1); } @@ -1886,7 +1886,7 @@ do_mount (GVfsBackend *backend, soup_message_headers_clear (msg_stat->response_headers); soup_message_body_truncate (msg_stat->response_body); - } while (mount_base->path != NULL); + } while (strcmp (mount_base->path, "/") != 0); /* we either encountered an error or we have reached the end of paths we are allowed to |