diff options
author | Tim Mayberry <mojofunk@gmail.com> | 2014-12-02 20:39:48 +0700 |
---|---|---|
committer | Tim Mayberry <mojofunk@gmail.com> | 2014-12-03 17:31:05 +0700 |
commit | dd976d8c7aece4c82b6abcc632f7ec002adeb8d6 (patch) | |
tree | 8a16dc78dbb1eb95531095ca0847a1351bdc9882 /libs/pbd | |
parent | 81d47f5b8c843ebf9a5b6d02282cd752c8fc1811 (diff) |
Add DEBUG_TRACE output to PBD::canonical_path
Diffstat (limited to 'libs/pbd')
-rw-r--r-- | libs/pbd/pathexpand.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libs/pbd/pathexpand.cc b/libs/pbd/pathexpand.cc index f9c42b4948..ee9fc2d351 100644 --- a/libs/pbd/pathexpand.cc +++ b/libs/pbd/pathexpand.cc @@ -28,6 +28,8 @@ #include <glibmm/fileutils.h> #include <glibmm/miscutils.h> +#include "pbd/compose.h" +#include "pbd/debug.h" #include "pbd/pathexpand.h" #include "pbd/strsplit.h" #include "pbd/tokenizer.h" @@ -89,10 +91,15 @@ PBD::canonical_path (const std::string& path) { char buf[PATH_MAX+1]; - if (!realpath (path.c_str(), buf)) { + if (realpath (path.c_str(), buf) == NULL) { + DEBUG_TRACE (DEBUG::FileUtils, + string_compose("PBD::canonical_path: Unable to resolve %1: %2\n", path, g_strerror(errno))); return path; } + DEBUG_TRACE (DEBUG::FileUtils, + string_compose("PBD::canonical_path %1 resolved to: %2\n", path, string(buf))); + return string (buf); } |