glib r7691 - trunk/gio
- From: matthiasc svn gnome org
- To: svn-commits-list gnome org
- Subject: glib r7691 - trunk/gio
- Date: Fri, 28 Nov 2008 07:04:43 +0000 (UTC)
Author: matthiasc
Date: Fri Nov 28 07:04:43 2008
New Revision: 7691
URL: http://svn.gnome.org/viewvc/glib?rev=7691&view=rev
Log:
Better fix
Modified:
trunk/gio/glocalvfs.c
Modified: trunk/gio/glocalvfs.c
==============================================================================
--- trunk/gio/glocalvfs.c (original)
+++ trunk/gio/glocalvfs.c Fri Nov 28 07:04:43 2008
@@ -118,10 +118,6 @@
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 @@
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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]