From e0ebeb3d5dc6096d8a91931b5627864015f68d34 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Mon, 21 Nov 2011 16:34:56 +0000 Subject: 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 --- libs/ardour/utils.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'libs') 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__ -- cgit v1.2.3