mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-03 20:29:35 +01:00
Add DEBUG_TRACE output to PBD::canonical_path
This commit is contained in:
parent
81d47f5b8c
commit
dd976d8c7a
1 changed files with 8 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue