Revision: 2528 http://geany.svn.sourceforge.net/geany/?rev=2528&view=rev Author: ntrel Date: 2008-04-25 04:50:48 -0700 (Fri, 25 Apr 2008)
Log Message: ----------- Make utils_is_absolute_path() a NULL-safe version of g_path_is_absolute().
Modified Paths: -------------- trunk/ChangeLog trunk/src/utils.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2008-04-25 11:47:01 UTC (rev 2527) +++ trunk/ChangeLog 2008-04-25 11:50:48 UTC (rev 2528) @@ -2,6 +2,9 @@
* src/document.c: Add/reorder a recent file item when closing a document. + * src/utils.c: + Make utils_is_absolute_path() a NULL-safe version of + g_path_is_absolute().
2008-04-24 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/src/utils.c =================================================================== --- trunk/src/utils.c 2008-04-25 11:47:01 UTC (rev 2527) +++ trunk/src/utils.c 2008-04-25 11:50:48 UTC (rev 2528) @@ -677,19 +677,13 @@ }
+/* NULL-safe version of g_path_is_absolute(). */ gboolean utils_is_absolute_path(const gchar *path) { if (! path || *path == '\0') return FALSE; -#ifdef G_OS_WIN32 - if (path[0] == '\' || path[1] == ':') - return TRUE; -#else - if (path[0] == '/') - return TRUE; -#endif
- return FALSE; + return g_path_is_absolute(path); }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.