From 09e471545bd1c41f474e733cc404867d87e87d49 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 11 Jul 2013 14:57:16 -0400 Subject: remove direct of realpath(2), replace with canonical_path() which is a no-op on windows --- libs/ardour/find_session.cc | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'libs/ardour/find_session.cc') diff --git a/libs/ardour/find_session.cc b/libs/ardour/find_session.cc index f0a034d8d4..afcbe7393b 100644 --- a/libs/ardour/find_session.cc +++ b/libs/ardour/find_session.cc @@ -27,6 +27,7 @@ #include #include "pbd/compose.h" +#include "pbd/pathexpand.h" #include "pbd/error.h" #include "ardour/filename_extensions.h" @@ -43,16 +44,10 @@ int find_session (string str, string& path, string& snapshot, bool& isnew) { struct stat statbuf; - char buf[PATH_MAX+1]; isnew = false; - if (!realpath (str.c_str(), buf) && (errno != ENOENT && errno != ENOTDIR)) { - error << string_compose (_("Could not resolve path: %1 (%2)"), buf, strerror(errno)) << endmsg; - return -1; - } - - str = buf; + str = canonical_path (str); /* check to see if it exists, and what it is */ -- cgit v1.2.3