* enforce that maildir paths are absolute

This commit is contained in:
Dirk-Jan C. Binnema
2010-02-04 23:00:34 +02:00
parent b416714622
commit 8448473732
4 changed files with 23 additions and 15 deletions

View File

@ -222,6 +222,12 @@ static gboolean
check_path (const char* path)
{
g_return_val_if_fail (path, FALSE);
if (!g_path_is_absolute (path)) {
g_warning ("%s: not an absolute path: %s",
__FUNCTION__, path);
return FALSE;
}
if (access (path, R_OK) != 0) {
g_warning ("%s: cannot open '%s': %s",