diff options
author | Matthias Clasen <matthiasc@src.gnome.org> | 2008-11-28 07:04:43 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2008-11-28 07:04:43 +0000 |
commit | 77a8c5cc15a8e083057877ee499f00020b9ded14 (patch) | |
tree | 4b9cffd99521aa224f453cac3f2250e3d892de82 /gio | |
parent | c5938128ec0bea93327dff5683052f7ec6710f59 (diff) |
Better fix
svn path=/trunk/; revision=7691
Diffstat (limited to 'gio')
-rw-r--r-- | gio/glocalvfs.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/gio/glocalvfs.c b/gio/glocalvfs.c index 2ec07eb82..6e78e74d8 100644 --- a/gio/glocalvfs.c +++ b/gio/glocalvfs.c @@ -118,10 +118,6 @@ g_local_vfs_parse_name (GVfs *vfs, char *user_prefix; const char *user_start, *user_end; char *rest; -#ifdef HAVE_PWD_H - struct passwd *passwd_file_entry; - char *user_name; -#endif g_return_val_if_fail (G_IS_VFS (vfs), NULL); g_return_val_if_fail (parse_name != NULL, NULL); @@ -145,6 +141,9 @@ g_local_vfs_parse_name (GVfs *vfs, else { #ifdef HAVE_PWD_H + struct passwd *passwd_file_entry; + char *user_name; + user_name = g_strndup (user_start, user_end - user_start); passwd_file_entry = getpwnam (user_name); g_free (user_name); |