Revision: 5539 http://geany.svn.sourceforge.net/geany/?rev=5539&view=rev Author: eht16 Date: 2011-02-06 16:47:18 +0000 (Sun, 06 Feb 2011)
Log Message: ----------- Rename utils_is_file_writeable() into utils_is_file_writable().
Modified Paths: -------------- trunk/ChangeLog trunk/src/main.c trunk/src/project.c trunk/src/socket.c trunk/src/utils.c trunk/src/utils.h
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2011-02-06 16:36:04 UTC (rev 5538) +++ trunk/ChangeLog 2011-02-06 16:47:18 UTC (rev 5539) @@ -9,6 +9,8 @@ Improve error checking when trying to write project files (patch by Colomban Wendling, thanks). Add a warning if writing the project file fails on close. + * src/utils.c, src/utils.h, src/project.c, src/main.c, src/socket.c: + Rename utils_is_file_writeable() into utils_is_file_writable().
2011-01-30 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/src/main.c =================================================================== --- trunk/src/main.c 2011-02-06 16:36:04 UTC (rev 5538) +++ trunk/src/main.c 2011-02-06 16:47:18 UTC (rev 5539) @@ -652,7 +652,7 @@
if (saved_errno == 0 && ! g_file_test(conf_file, G_FILE_TEST_EXISTS)) { /* check whether geany.conf can be written */ - saved_errno = utils_is_file_writeable(app->configdir); + saved_errno = utils_is_file_writable(app->configdir); }
/* make subdir for filetype definitions */
Modified: trunk/src/project.c =================================================================== --- trunk/src/project.c 2011-02-06 16:36:04 UTC (rev 5538) +++ trunk/src/project.c 2011-02-06 16:47:18 UTC (rev 5539) @@ -729,7 +729,7 @@ g_free(locale_path); } /* finally test whether the given project file can be written */ - if ((err_code = utils_is_file_writeable(locale_filename)) != 0 || + if ((err_code = utils_is_file_writable(locale_filename)) != 0 || (err_code = g_file_test(locale_filename, G_FILE_TEST_IS_DIR) ? EISDIR : 0) != 0) { SHOW_ERR1(_("Project file could not be written (%s)."), g_strerror(err_code));
Modified: trunk/src/socket.c =================================================================== --- trunk/src/socket.c 2011-02-06 16:36:04 UTC (rev 5538) +++ trunk/src/socket.c 2011-02-06 16:47:18 UTC (rev 5539) @@ -410,7 +410,7 @@ real_path = g_strdup_printf("%s%cgeany_socket.%08x", g_get_tmp_dir(), G_DIR_SEPARATOR, g_random_int());
- if (utils_is_file_writeable(real_path) != 0) + if (utils_is_file_writable(real_path) != 0) { /* if real_path is not writable for us, fall back to ~/.config/geany/geany_socket_*_* */ /* instead of creating a symlink and print a warning */ g_warning("Socket %s could not be written, using %s as fallback.", real_path, path);
Modified: trunk/src/utils.c =================================================================== --- trunk/src/utils.c 2011-02-06 16:36:04 UTC (rev 5538) +++ trunk/src/utils.c 2011-02-06 16:47:18 UTC (rev 5539) @@ -653,7 +653,7 @@
/* Checks whether the given file can be written. locale_filename is expected in locale encoding. * Returns 0 if it can be written, otherwise it returns errno */ -gint utils_is_file_writeable(const gchar *locale_filename) +gint utils_is_file_writable(const gchar *locale_filename) { gchar *file; gint ret;
Modified: trunk/src/utils.h =================================================================== --- trunk/src/utils.h 2011-02-06 16:36:04 UTC (rev 5538) +++ trunk/src/utils.h 2011-02-06 16:47:18 UTC (rev 5539) @@ -234,7 +234,7 @@
gboolean utils_str_has_upper(const gchar *str);
-gint utils_is_file_writeable(const gchar *locale_filename); +gint utils_is_file_writable(const gchar *locale_filename);
gboolean utils_spawn_sync(const gchar *dir, gchar **argv, gchar **env, GSpawnFlags flags,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.