* fix mu_util_dir_expand for non-existant dirs, add unit test
This commit is contained in:
@ -93,7 +93,11 @@ mu_util_dir_expand (const char *path)
|
||||
dir = do_wordexp (path);
|
||||
if (!dir)
|
||||
return NULL; /* error */
|
||||
|
||||
|
||||
/* don't try realpath if the dir does not exist */
|
||||
if (access (dir, F_OK) != 0)
|
||||
return dir;
|
||||
|
||||
/* now resolve any symlinks, .. etc. */
|
||||
if (realpath (dir, resolved) == NULL) {
|
||||
g_debug ("%s: could not get realpath for '%s': %s",
|
||||
|
||||
Reference in New Issue
Block a user