X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Futils.cc;h=08bb61065b2fe950d39983d63688fba87f2efbc1;hb=7cb8b94d078613d4f378e53237b707c48e50172e;hp=c66b34a2bab3b08e9819867cca949585864554d8;hpb=bbfb53e88145e2a364ef29597b9b9c703853296f;p=ardour.git diff --git a/libs/ardour/utils.cc b/libs/ardour/utils.cc index c66b34a2ba..08bb61065b 100644 --- a/libs/ardour/utils.cc +++ b/libs/ardour/utils.cc @@ -33,7 +33,6 @@ #include #include #include -#include #include #include #ifndef COMPILER_MSVC @@ -42,6 +41,8 @@ #include #include +#include "pbd/gstdio_compat.h" + #include #include @@ -132,13 +133,13 @@ ARDOUR::legalize_for_uri (const string& str) * version. */ -string +string ARDOUR::legalize_for_path_2X (const string& str) { string::size_type pos; string legal_chars = "abcdefghijklmnopqrtsuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_+=: "; Glib::ustring legal; - + /* this is the one place in Ardour where we need to iterate across * potential multibyte characters, and thus we need Glib::ustring */ @@ -662,11 +663,11 @@ ARDOUR::native_header_format_extension (HeaderFormat hf, const DataType& type) bool ARDOUR::matching_unsuffixed_filename_exists_in (const string& dir, const string& path) { - string bws = basename_nosuffix (path); + string bws = basename_nosuffix (path); struct dirent* dentry; - struct stat statbuf; + GStatBuf statbuf; DIR* dead; - bool ret = false; + bool ret = false; if ((dead = ::opendir (dir.c_str())) == 0) { error << string_compose (_("cannot open directory %1 (%2)"), dir, strerror (errno)) << endl; @@ -684,7 +685,7 @@ ARDOUR::matching_unsuffixed_filename_exists_in (const string& dir, const string& string fullpath = Glib::build_filename (dir, dentry->d_name); - if (::stat (fullpath.c_str(), &statbuf)) { + if (g_stat (fullpath.c_str(), &statbuf)) { continue; }