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 (dirpath)) {
string txt = _("Cannot write file in: ") + dirpath;
MessageDialog msg (*this, txt, false, MESSAGE_ERROR, BUTTONS_OK, true);
msg.run();