diff options
author | Alexander Larsson <alexl@redhat.com> | 2008-01-18 11:24:58 +0000 |
---|---|---|
committer | Alexander Larsson <alexl@src.gnome.org> | 2008-01-18 11:24:58 +0000 |
commit | b2f6c97d1cf723946b4d7a24d56ffbfb920d1d7c (patch) | |
tree | aa45f4e9a449b5ddeb29c405c1d88dc2a3cda8b9 | |
parent | 3d50608938aacd9e3a0c9e38349f7437d1533340 (diff) | |
download | gvfs-b2f6c97d1cf723946b4d7a24d56ffbfb920d1d7c.tar.gz |
Ensure that mount_prefix is never NULL. It should be "/" in that case.
2008-01-18 Alexander Larsson <alexl@redhat.com>
* common/gmountspec.c:
(g_mount_spec_new_from_data):
Ensure that mount_prefix is never NULL. It
should be "/" in that case.
svn path=/trunk/; revision=1151
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | common/gmountspec.c | 6 |
2 files changed, 12 insertions, 1 deletions
@@ -1,3 +1,10 @@ +2008-01-18 Alexander Larsson <alexl@redhat.com> + + * common/gmountspec.c: + (g_mount_spec_new_from_data): + Ensure that mount_prefix is never NULL. It + should be "/" in that case. + 2008-01-18 Luca Ferretti <elle.uca@libero.it> * programs/Makefile.am: diff --git a/common/gmountspec.c b/common/gmountspec.c index 179e2a5a..64640d35 100644 --- a/common/gmountspec.c +++ b/common/gmountspec.c @@ -58,6 +58,7 @@ g_mount_spec_new (const char *type) return spec; } +/* Takes ownership of passed in data */ GMountSpec * g_mount_spec_new_from_data (GArray *items, char *mount_prefix) @@ -67,7 +68,10 @@ g_mount_spec_new_from_data (GArray *items, spec = g_new0 (GMountSpec, 1); spec->ref_count = 1; spec->items = items; - spec->mount_prefix = mount_prefix; + if (mount_prefix == NULL) + spec->mount_prefix = g_strdup ("/"); + else + spec->mount_prefix = mount_prefix; g_array_sort (spec->items, item_compare); |