summaryrefslogtreecommitdiff
path: root/libs/ardour/find_session.cc
diff options
context:
space:
mode:
authorJohn Emmas <johne53@tiscali.co.uk>2015-10-04 14:18:54 +0100
committerJohn Emmas <johne53@tiscali.co.uk>2015-10-04 14:18:54 +0100
commitc68736bc028a4965df4d43d59e550ba3185054fb (patch)
tree1c9b33f16e2f93ee621d0ad7246959513e9ab136 /libs/ardour/find_session.cc
parentcf33204e358de6ee2f46a7c595e27948994c80bf (diff)
Change a few instances of 'stat()' to use 'g_stat()' (for UTF8 compatibility on Windows)
Diffstat (limited to 'libs/ardour/find_session.cc')
-rw-r--r--libs/ardour/find_session.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/libs/ardour/find_session.cc b/libs/ardour/find_session.cc
index 67aa43d071..e6ab2b1e24 100644
--- a/libs/ardour/find_session.cc
+++ b/libs/ardour/find_session.cc
@@ -18,12 +18,13 @@
*/
#include <unistd.h>
-#include <sys/stat.h>
#include <cstring>
#include <climits>
#include <cerrno>
+#include <pbd/gstdio_compat.h>
+
#include <glibmm/miscutils.h>
#include "pbd/compose.h"
@@ -44,7 +45,7 @@ namespace ARDOUR {
int
find_session (string str, string& path, string& snapshot, bool& isnew)
{
- struct stat statbuf;
+ GStatBuf statbuf;
isnew = false;
@@ -52,7 +53,7 @@ find_session (string str, string& path, string& snapshot, bool& isnew)
/* check to see if it exists, and what it is */
- if (stat (str.c_str(), &statbuf)) {
+ if (g_stat (str.c_str(), &statbuf)) {
if (errno == ENOENT) {
isnew = true;
} else {
@@ -81,7 +82,7 @@ find_session (string str, string& path, string& snapshot, bool& isnew)
/* is it there ? */
- if (stat (tmp.c_str(), &statbuf)) {
+ if (g_stat (tmp.c_str(), &statbuf)) {
error << string_compose (_("cannot check statefile %1 (%2)"), tmp, strerror (errno))
<< endmsg;
return -1;