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:
@@ -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__
|
||||
|
||||
Reference in New Issue
Block a user