summaryrefslogtreecommitdiff
path: root/libs/ardour/session_state.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/session_state.cc
parentcf33204e358de6ee2f46a7c595e27948994c80bf (diff)
Change a few instances of 'stat()' to use 'g_stat()' (for UTF8 compatibility on Windows)
Diffstat (limited to 'libs/ardour/session_state.cc')
-rw-r--r--libs/ardour/session_state.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc
index d09385b8bf..57d5dda926 100644
--- a/libs/ardour/session_state.cc
+++ b/libs/ardour/session_state.cc
@@ -31,7 +31,6 @@
#include <cstdio> /* snprintf(3) ... grrr */
#include <cmath>
#include <unistd.h>
-#include <sys/stat.h>
#include <climits>
#include <signal.h>
#include <sys/time.h>
@@ -3065,7 +3064,7 @@ Session::cleanup_sources (CleanupReport& rep)
/* now try to move all unused files into the "dead" directory(ies) */
for (vector<string>::iterator x = unused.begin(); x != unused.end(); ++x) {
- struct stat statbuf;
+ GStatBuf statbuf;
string newpath;
@@ -3130,7 +3129,7 @@ Session::cleanup_sources (CleanupReport& rep)
}
- stat ((*x).c_str(), &statbuf);
+ g_stat ((*x).c_str(), &statbuf);
if (::rename ((*x).c_str(), newpath.c_str()) != 0) {
error << string_compose (_("cannot rename unused file source from %1 to %2 (%3)"),
@@ -3161,8 +3160,8 @@ Session::cleanup_sources (CleanupReport& rep)
}
rep.paths.push_back (*x);
- rep.space += statbuf.st_size;
- }
+ rep.space += statbuf.st_size;
+ }
/* dump the history list */