summaryrefslogtreecommitdiff
path: root/libs/ardour/find_session.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2013-07-11 14:57:16 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2013-07-11 14:57:16 -0400
commit09e471545bd1c41f474e733cc404867d87e87d49 (patch)
treed58274312a20b08b3b99fcea99f9a0c00998ce31 /libs/ardour/find_session.cc
parent2ddab2d2f6738f9c1dc0dd31a12cdeb6b7fe540e (diff)
remove direct of realpath(2), replace with canonical_path() which is a no-op on windows
Diffstat (limited to 'libs/ardour/find_session.cc')
-rw-r--r--libs/ardour/find_session.cc9
1 files changed, 2 insertions, 7 deletions
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 <glibmm/miscutils.h>
#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 */