Kaydet (Commit) 31e13db9 authored tarafından Enrico Tröger's avatar Enrico Tröger

Fix bug when creating configuration directory on Unix.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2032 ea778897-0a13-0410-b9d1-a72fbfd435f5
üst c5f190f7
......@@ -2,6 +2,7 @@
* src/vte.c: Apply patch from Simone Denei to add a "Restart" item to
the VTE popup menu in case running application hangs.
* src/utils.c: Fix bug when creating configuration directory on Unix.
2007-11-06 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
......
......@@ -722,6 +722,12 @@ gchar *utils_get_hostname()
}
#ifdef G_OS_WIN32
# define DIR_SEP "\\" // on Windows we need an additional dir separator
#else
# define DIR_SEP ""
#endif
gint utils_make_settings_dir()
{
gint saved_errno = 0;
......@@ -744,17 +750,13 @@ gint utils_make_settings_dir()
// use _waccess on Windows, access() doesn't accept special characters
saved_errno = win32_check_write_permission(app->configdir);
#else
access(app->configdir, R_OK | W_OK);
// access set also errno to "FILE NOT FOUND" even if app->configdir is writeable, so use
// errno only when access() explicitly returns an error
if (access(app->configdir, R_OK | W_OK) != 0)
saved_errno = errno;
#endif
saved_errno = errno;
}
#ifdef G_OS_WIN32
# define DIR_SEP "\\" // on Windows we need an additional dir separator
#else
# define DIR_SEP ""
#endif
// make subdir for filetype definitions
if (saved_errno == 0)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment