use return value of realpath() and note an error if it occurs

git-svn-id: svn://localhost/ardour2/branches/3.0@10732 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis
2011-11-21 16:34:56 +00:00
parent 6e2bd18905
commit e0ebeb3d5d

View File

@@ -340,8 +340,13 @@ path_expand (string path)
/* canonicalize */
char buf[PATH_MAX+1];
realpath (path.c_str(), buf);
return buf;
if (realpath (path.c_str(), buf)) {
return buf;
} else {
error << string_compose (_("programming error: realpath(%1) failed, errcode %2"), path, errno) << endmsg;
return path;
}
}
#if __APPLE__