mu: Default to XDG Base Directory Specification
Instead of using ~/.mu, use the XDG Base Directory Specification, typically: ~/.cache/xapian ~/.cache/mu.log ~/.cache/parts ~/.config/bookmarks Update dependencies, documentation.
This commit is contained in:
@ -194,32 +194,6 @@ mu_util_guess_maildir (void)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
gchar*
|
||||
mu_util_guess_mu_homedir (void)
|
||||
{
|
||||
const char* home;
|
||||
const gchar *hdir1;
|
||||
|
||||
/* first, try MU_HOME */
|
||||
hdir1 = g_getenv ("MU_HOME");
|
||||
|
||||
if (hdir1 && mu_util_check_dir (hdir1, TRUE, FALSE))
|
||||
return g_strdup (hdir1);
|
||||
|
||||
/* then, g_get_home_dir use /etc/passwd, not $HOME; this is
|
||||
* better, as HOME may be wrong when using 'sudo' etc.*/
|
||||
home = g_get_home_dir ();
|
||||
|
||||
if (!home) {
|
||||
MU_WRITE_LOG ("failed to determine homedir");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return g_strdup_printf ("%s%c%s", home ? home : ".",
|
||||
G_DIR_SEPARATOR, ".mu");
|
||||
}
|
||||
|
||||
gboolean
|
||||
mu_util_create_dir_maybe (const gchar *path, mode_t mode, gboolean nowarn)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user