Show error when you lack write permissions to configdir

This commit is contained in:
TingPing 2014-01-26 06:50:29 -05:00
parent 7fcf70c539
commit 35e84f6edc

View File

@ -1089,7 +1089,7 @@ main (int argc, char *argv[])
{
/* this is probably the first run */
load_default_config ();
make_config_dirs (); /* FIXME: if this fail display an error (?) */
make_config_dirs ();
make_dcc_dirs ();
}
@ -1114,6 +1114,18 @@ main (int argc, char *argv[])
fe_init ();
/* This is done here because cfgfiles.c is too early in
* the startup process to use gtk functions. */
if (g_access (get_xdir (), W_OK) != 0)
{
char buf[2048];
g_snprintf (buf, sizeof(buf),
_("You do not have write access to %s. Nothing from this session can be saved."),
get_xdir ());
fe_message (buf, FE_MSG_ERROR);
}
#ifndef WIN32
#ifndef __EMX__
/* OS/2 uses UID 0 all the time */