libgnome r3594 - in trunk: . libgnome
- From: tml svn gnome org
- To: svn-commits-list gnome org
- Subject: libgnome r3594 - in trunk: . libgnome
- Date: Wed, 23 Jan 2008 01:25:27 +0000 (GMT)
Author: tml
Date: Wed Jan 23 01:25:27 2008
New Revision: 3594
URL: http://svn.gnome.org/viewvc/libgnome?rev=3594&view=rev
Log:
2008-01-23 Tor Lillqvist <tml novell com>
* libgnome/gnome-config.c (check_path): Use g_stat().
* libgnome/gnome-init.c (libgnome_userdir_setup): Use
G_IS_DIR_SEPARATOR(). Use g_stat().
Modified:
trunk/ChangeLog
trunk/libgnome/gnome-config.c
trunk/libgnome/gnome-init.c
Modified: trunk/libgnome/gnome-config.c
==============================================================================
--- trunk/libgnome/gnome-config.c (original)
+++ trunk/libgnome/gnome-config.c Wed Jan 23 01:25:27 2008
@@ -667,7 +667,7 @@
/*special case if directory exists, this is probably gonna happen
a lot so we don't want to go though checking it part by part*/
- if (stat(dir, &s) == 0) {
+ if (g_stat(dir, &s) == 0) {
g_free(dir);
/*check if a directory*/
if (!S_ISDIR(s.st_mode))
@@ -700,7 +700,7 @@
else
newpath = g_string_append_c(newpath, G_DIR_SEPARATOR);
newpath = g_string_append(newpath,p);
- if(stat(newpath->str,&s)==0) {
+ if(g_stat(newpath->str,&s)==0) {
/*check if a directory*/
if(!S_ISDIR(s.st_mode)) {
g_string_free(newpath,TRUE);
Modified: trunk/libgnome/gnome-init.c
==============================================================================
--- trunk/libgnome/gnome-init.c (original)
+++ trunk/libgnome/gnome-init.c Wed Jan 23 01:25:27 2008
@@ -357,11 +357,7 @@
/* chop trailing slash */
len = strlen (gnome_user_dir);
- if (len > 1 && (gnome_user_dir[len-1] == G_DIR_SEPARATOR
-#ifdef G_OS_WIN32
- || gnome_user_dir[len-1] == '/'
-#endif
- ))
+ if (len > 1 && G_IS_DIR_SEPARATOR (gnome_user_dir[len - 1]))
gnome_user_dir[len - 1] = '\0';
gnome_user_private_dir = g_strconcat (gnome_user_dir,
@@ -404,7 +400,7 @@
}
- if (stat (gnome_user_private_dir, &statbuf) < 0) {
+ if (g_stat (gnome_user_private_dir, &statbuf) < 0) {
g_printerr (_("Could not stat private per-user gnome configuration directory `%s': %s\n"),
gnome_user_private_dir, strerror(errno));
exit(1);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]