#include <sstream>
+#include "pbd/filesystem.h"
+
#include "ardour/audioengine.h"
#include "ardour/sndfile_helpers.h"
string filepath = get_target_filepath(
get_selected_file_name(),
currentLocation->name(),
- sndfile_file_ending_from_string(get_selected_header_format()));
+ get_selected_header_format());
initSpec(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();