Revision: 1481
          http://geeqie.svn.sourceforge.net/geeqie/?rev=1481&view=rev
Author:   zas_
Date:     2009-03-06 14:53:32 +0000 (Fri, 06 Mar 2009)

Log Message:
-----------
Fix utf8/locale conversion warning: the path passed to isdir() is not in UTF8 
(if local fs is not in UFT8) so do not use it (isdir() uses stat_utf8() which 
calls path_from_utf8()).

Modified Paths:
--------------
    trunk/src/ui_tabcomp.c

Modified: trunk/src/ui_tabcomp.c
===================================================================
--- trunk/src/ui_tabcomp.c      2009-03-06 14:42:32 UTC (rev 1480)
+++ trunk/src/ui_tabcomp.c      2009-03-06 14:53:32 UTC (rev 1481)
@@ -113,10 +113,10 @@
 
        pathl = path_from_utf8(path);
        dp = opendir(pathl);
-       g_free(pathl);
        if (!dp)
                {
                /* dir not found */
+               g_free(pathl);
                return;
                }
        while ((dir = readdir(dp)) != NULL)
@@ -124,9 +124,9 @@
                gchar *name = dir->d_name;
                if (strcmp(name, ".") != 0 && strcmp(name, "..") != 0)
                        {
-                       gchar *abspath = g_build_filename(path, name, NULL);
+                       gchar *abspath = g_build_filename(pathl, name, NULL);
 
-                       if (isdir(abspath))
+                       if (g_file_test(abspath, G_FILE_TEST_IS_DIR))
                                {
                                gchar *dname = g_strconcat(name, 
G_DIR_SEPARATOR_S, NULL);
                                list = g_list_prepend(list, 
path_to_utf8(dname));
@@ -143,6 +143,7 @@
 
        td->dir_path = g_strdup(path);
        td->file_list = list;
+       g_free(pathl);
 }
 
 static void tab_completion_destroy(GtkWidget *widget, gpointer data)


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Geeqie-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geeqie-svn

Reply via email to