summaryrefslogtreecommitdiff
path: root/libs/ardour/utils.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/utils.cc')
-rw-r--r--libs/ardour/utils.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/libs/ardour/utils.cc b/libs/ardour/utils.cc
index 929d85b583..afd83b62b5 100644
--- a/libs/ardour/utils.cc
+++ b/libs/ardour/utils.cc
@@ -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__