Revision: 1771 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=1771&view=re... Author: dimitrov-adrian Date: 2010-12-14 10:56:42 +0000 (Tue, 14 Dec 2010)
Log Message: ----------- Fixed nighty compilation error (reported by Enrico Tr?\195?\182ger)
Modified Paths: -------------- trunk/geany-plugins/treebrowser/ChangeLog trunk/geany-plugins/treebrowser/src/treebrowser.c
Modified: trunk/geany-plugins/treebrowser/ChangeLog =================================================================== --- trunk/geany-plugins/treebrowser/ChangeLog 2010-12-12 21:41:55 UTC (rev 1770) +++ trunk/geany-plugins/treebrowser/ChangeLog 2010-12-14 10:56:42 UTC (rev 1771) @@ -35,6 +35,11 @@ +-------------------------------+
+14-12-2010 Adrian Dimitrov dimitrov.adrian@gmail.com + + * src/treebrowser.c + Fixed nighty compilation error (reported by Enrico Tröger) + 10-12-2010 Adrian Dimitrov dimitrov.adrian@gmail.com
* ChangeLog
Modified: trunk/geany-plugins/treebrowser/src/treebrowser.c =================================================================== --- trunk/geany-plugins/treebrowser/src/treebrowser.c 2010-12-12 21:41:55 UTC (rev 1770) +++ trunk/geany-plugins/treebrowser/src/treebrowser.c 2010-12-14 10:56:42 UTC (rev 1771) @@ -6,9 +6,9 @@
#include <sys/types.h> #include <sys/stat.h> +#include <string.h> #include <fcntl.h> #include <glib.h> -#include <string.h> #include <glib/gstdio.h>
#include "geany.h" @@ -269,9 +269,12 @@ check_hidden(const gchar *uri) { gboolean is_visible = TRUE; + gchar *base_name; + +#ifdef G_OS_WIN32 +# ifdef HAVE_GIO GFile *file; GFileInfo *info; - gchar *base_name;
if (CONFIG_SHOW_HIDDEN_FILES) { @@ -289,8 +292,6 @@ return FALSE; }
-#ifdef G_OS_WIN32 -# ifdef HAVE_GIO file = g_file_new_for_path(uri); info = g_file_query_info(file, G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN, 0, NULL, NULL); if (info) @@ -303,6 +304,18 @@ # endif /* HAVE_GIO */ #else /* G_OS_WIN32 */
+ if (CONFIG_SHOW_HIDDEN_FILES) + { + g_free(base_name); + return TRUE; + } + + if (uri[strlen(uri) - 1] == '~') + { + g_free(base_name); + return FALSE; + } + base_name = g_path_get_basename(uri); if (base_name[0] == '.') is_visible = FALSE;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.