Rename utils_is_file_writeable() into utils_is_file_writable().

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5539 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Enrico Tröger 2011-02-06 16:47:18 +00:00
parent 426dbff4b6
commit bf4067f910
6 changed files with 7 additions and 5 deletions

View File

@ -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>

View File

@ -652,7 +652,7 @@ static gint create_config_dir(void)
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 */

View File

@ -729,7 +729,7 @@ static gboolean update_config(const PropertyDialogElements *e, gboolean new_proj
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));

View File

@ -410,7 +410,7 @@ static gint socket_fd_open_unix(const gchar *path)
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);

View File

@ -653,7 +653,7 @@ gchar *utils_get_hostname(void)
/* 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;

View File

@ -234,7 +234,7 @@ gchar *utils_get_help_url(const gchar *suffix);
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,