summaryrefslogtreecommitdiff
path: root/libs/ardour/utils.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2011-11-21 16:34:56 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2011-11-21 16:34:56 +0000
commite0ebeb3d5dc6096d8a91931b5627864015f68d34 (patch)
tree4de395e9758c3571082062863c89e076616f61b6 /libs/ardour/utils.cc
parent6e2bd18905a472230278e89de1a3e93b2d49821a (diff)
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
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__