]> Pileus Git - ~andy/gtk/commitdiff
Use g_path_get_dirname() instead of the nonportable <libgen.h> and
authorTor Lillqvist <tml@novell.com>
Mon, 15 Aug 2005 14:53:00 +0000 (14:53 +0000)
committerTor Lillqvist <tml@src.gnome.org>
Mon, 15 Aug 2005 14:53:00 +0000 (14:53 +0000)
2005-08-15  Tor Lillqvist  <tml@novell.com>

* gtk/updateiconcache.c: Use g_path_get_dirname() instead of
the nonportable <libgen.h> and dirname().

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-8
gtk/updateiconcache.c

index 2cf76c7be7a609b605063f615cbe4585c236ddce..1e6d558b97f6858f30d3a871618316187860b99f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-08-15  Tor Lillqvist  <tml@novell.com>
+
+       * gtk/updateiconcache.c: Use g_path_get_dirname() instead of
+       the nonportable <libgen.h> and dirname().
+
 2005-08-15  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/gtksizegroup.c: Use object data to mark widgets and
index 2cf76c7be7a609b605063f615cbe4585c236ddce..1e6d558b97f6858f30d3a871618316187860b99f 100644 (file)
@@ -1,3 +1,8 @@
+2005-08-15  Tor Lillqvist  <tml@novell.com>
+
+       * gtk/updateiconcache.c: Use g_path_get_dirname() instead of
+       the nonportable <libgen.h> and dirname().
+
 2005-08-15  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/gtksizegroup.c: Use object data to mark widgets and
index 2cf76c7be7a609b605063f615cbe4585c236ddce..1e6d558b97f6858f30d3a871618316187860b99f 100644 (file)
@@ -1,3 +1,8 @@
+2005-08-15  Tor Lillqvist  <tml@novell.com>
+
+       * gtk/updateiconcache.c: Use g_path_get_dirname() instead of
+       the nonportable <libgen.h> and dirname().
+
 2005-08-15  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/gtksizegroup.c: Use object data to mark widgets and
index ae2c38d6124a7a7baf3ad7fb56a69babb80ac574..9f5fd56b8627369cb225ba23c17c0f11b71fe4e4 100644 (file)
@@ -33,7 +33,6 @@
 #else
 #include <utime.h>
 #endif
-#include <libgen.h>
 
 #include <glib.h>
 #include <glib/gstdio.h>
@@ -343,12 +342,13 @@ follow_links (const gchar *path)
       
       if (target)
        {
-         if (target[0] == '/')
-           path2 =  target;
+         if (g_path_is_absolute (target))
+           path2 = target;
          else
            {
-             d = dirname (path2);
-             s = g_build_path ("/", d, target, NULL);
+             d = g_path_get_dirname (path2);
+             s = g_build_filename (d, target, NULL);
+             g_free (d);
              g_free (target);
              g_free (path2);
              path2 = s;