build: don't require glib 2.58 for g_canonicalize_file

GLib version is probably still a bit too new, so simply lift the
function needed.

Fixes: #1712.
This commit is contained in:
Dirk-Jan C. Binnema
2020-05-28 00:37:29 +03:00
parent 9192fd71a0
commit 0a49cead33
4 changed files with 154 additions and 2 deletions

View File

@ -49,6 +49,20 @@ G_BEGIN_DECLS
char* mu_util_dir_expand (const char* path)
G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT;
/**
* See g_canonicalize_filename
*
* @param filename
* @param relative_to
*
* @return
*/
char *mu_canonicalize_filename (const gchar *filename,
const gchar *relative_to)
G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT;
/**
* guess the maildir; first try $MAILDIR; if it is unset or
* non-existent, try ~/Maildir if both fail, return NULL