summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2011-04-09 15:38:42 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2011-04-09 15:38:42 +0000
commit41d0052d19b44474b09b8066838c2479d9788d83 (patch)
treee691db3cf597e115e4c5fa1c2f447ed11fddb42b /gtk2_ardour
parent8177e85bf915ddba427024423450c9472cf3a490 (diff)
remove all use of access(2) (this was done a bit stupidly, we could have used g_access)
git-svn-id: svn://localhost/ardour2/branches/3.0@9340 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/editor_export_audio.cc4
-rw-r--r--gtk2_ardour/export_range_markers_dialog.cc4
2 files changed, 5 insertions, 3 deletions
diff --git a/gtk2_ardour/editor_export_audio.cc b/gtk2_ardour/editor_export_audio.cc
index 7b77f19099..2eff80614e 100644
--- a/gtk2_ardour/editor_export_audio.cc
+++ b/gtk2_ardour/editor_export_audio.cc
@@ -221,7 +221,7 @@ Editor::write_region (string path, boost::shared_ptr<AudioRegion> region)
path = s;
- if (::access (path.c_str(), F_OK) != 0) {
+ if (!Glib::file_test (path, Glib::FILE_TEST_EXISTS)) {
break;
}
}
@@ -360,7 +360,7 @@ Editor::write_audio_range (AudioPlaylist& playlist, const ChanCount& count, list
legalize_for_path(playlist.name()).c_str(), cnt, n);
}
- if (::access (s, F_OK) != 0) {
+ if (!Glib::file_test (s, Glib::FILE_TEST_EXISTS)) {
break;
}
}
diff --git a/gtk2_ardour/export_range_markers_dialog.cc b/gtk2_ardour/export_range_markers_dialog.cc
index 774a956d9e..06f590758c 100644
--- a/gtk2_ardour/export_range_markers_dialog.cc
+++ b/gtk2_ardour/export_range_markers_dialog.cc
@@ -22,6 +22,8 @@
#include <sstream>
+#include "pbd/filesystem.h"
+
#include "ardour/audioengine.h"
#include "ardour/sndfile_helpers.h"
@@ -155,7 +157,7 @@ ExportRangeMarkersDialog::is_filepath_valid(string &filepath)
// directory needs to exist and be writable
string dirpath = Glib::path_get_dirname (filepath);
- if (::access (dirpath.c_str(), W_OK) != 0) {
+ if (!exists_and_writable (sys::path (dirpath))) {
string txt = _("Cannot write file in: ") + dirpath;
MessageDialog msg (*this, txt, false, MESSAGE_ERROR, BUTTONS_OK, true);
msg.run();